Expect(imageMetadata.ExposedPorts).To(Equal([]uint16{uint16(27017), uint16(28321)}))
				Expect(imageMetadata.Env).To(ConsistOf([]string{"A=1", "B=2"}))

				Expect(fakeDockerSessionFactory.MakeSessionCallCount()).To(Equal(1))
				Expect(fakeDockerSessionFactory.MakeSessionArgsForCall(0)).To(Equal(dockerImageNoTag))

				Expect(fakeDockerSession.GetRepositoryDataCallCount()).To(Equal(1))
				Expect(fakeDockerSession.GetRepositoryDataArgsForCall(0)).To(Equal(dockerImageNoTag))

				Expect(fakeDockerSession.GetRemoteTagsCallCount()).To(Equal(1))
				registries, repo, tokens := fakeDockerSession.GetRemoteTagsArgsForCall(0)
				Expect(registries).To(ConsistOf("https://registry-1.docker.io/v1/"))
				Expect(repo).To(Equal("cool_user123/sweetapp"))
				Expect(tokens).To(ConsistOf("signature=abc,repository=\"cloudfoundry/lattice-app\",access=read"))

				Expect(fakeDockerSession.GetRemoteImageJSONCallCount()).To(Equal(1))
				imgIDParam, remoteImageEndpointParam, remoteImageTokensParam := fakeDockerSession.GetRemoteImageJSONArgsForCall(0)
				Expect(imgIDParam).To(Equal("29d531509fb"))
				Expect(remoteImageEndpointParam).To(Equal("https://registry-1.docker.io/v1/"))
				Expect(remoteImageTokensParam).To(ConsistOf("signature=abc,repository=\"cloudfoundry/lattice-app\",access=read"))
			})
		})

		Context("when fetching metadata from a signed custom registry", func() {
			It("returns the image metadata", func() {
				fakeDockerSessionFactory.MakeSessionReturns(fakeDockerSession, nil)
				imageList := map[string]*registry.ImgData{
					"29d531509fb": &registry.ImgData{
						ID:              "29d531509fb",
						Checksum:        "dsflksdfjlkj",
						ChecksumPayload: "sdflksdjfkl",