### Question:
ImageManager { public List<ImageUploaded> getVmImages() { return cloudMiddleware.getVmImages(); } ImageManager(CloudMiddleware cloudMiddleware); List<ImageUploaded> getVmImages(); String createVmImage(ImageToUpload imageToUpload); ImageUploaded getVmImage(String imageId); void deleteVmImage(String id); List<String> getVmImagesIds();  }### Answer:
@Test public void getVmImages() { List<ImageUploaded> mockedCloudMiddlewareResponse = new ArrayList<>(); mockedCloudMiddlewareResponse.add(new ImageUploaded("imageId", "imageName", "active")); Mockito.when(mockedCloudMiddleware.getVmImages()).thenReturn(mockedCloudMiddlewareResponse); assertEquals(mockedCloudMiddlewareResponse, imageManager.getVmImages()); }
@Test public void getVmImagesReturnsEmptyWhenThereAreNotAnyImages() { Mockito.when(mockedCloudMiddleware.getVmImages()).thenReturn(new ArrayList<ImageUploaded>()); assertTrue(imageManager.getVmImages().isEmpty()); }