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