@Test public void testNotFoundResult() { GlanceImage newImage1 = new GlanceImage(); newImage1.setId("id1"); newImage1.setName("exist-id1"); when(imageService.list(anyMap())).thenReturn(null); doReturn(ImmutableList.of(newImage1)).when(imageService).list(); assertFalse(underTest.exist(osClient, "invalidentryTgatResultsNull")); }
public boolean exist(OSClient<?> osClient, String name) { return getStatus(osClient, name).isPresent(); }
OpenStackImageVerifier { public boolean exist(OSClient<?> osClient, String name) { return getStatus(osClient, name).isPresent(); } }
OpenStackImageVerifier { public boolean exist(OSClient<?> osClient, String name) { return getStatus(osClient, name).isPresent(); }  }
OpenStackImageVerifier { public boolean exist(OSClient<?> osClient, String name) { return getStatus(osClient, name).isPresent(); }  boolean exist(OSClient<?> osClient, String name); Optional<ImageStatus> getStatus(OSClient<?> osClient, String name); }
OpenStackImageVerifier { public boolean exist(OSClient<?> osClient, String name) { return getStatus(osClient, name).isPresent(); }  boolean exist(OSClient<?> osClient, String name); Optional<ImageStatus> getStatus(OSClient<?> osClient, String name);  }