@Test public void deleteSample() throws Exception { Response<Sample> response = Response.success(sample); @SuppressWarnings("unchecked") Call<Sample> responseCall = mock(Call.class); doReturn(response).when(responseCall).execute(); doReturn(request).when(responseCall).request(); doReturn(responseCall).when(svc).deleteSample(any(), anyString()); refocus.deleteSample("id"); verify(svc).deleteSample(AUTHORIZATION_HEADER, "id"); }
public Sample deleteSample(String key) throws UnauthorizedException { Preconditions.checkNotNull(key, "Key should not be null"); return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public Sample deleteSample(String key) throws UnauthorizedException { Preconditions.checkNotNull(key, "Key should not be null"); return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null); } }
RefocusClient extends AbstractRemoteClient<RefocusService> { public Sample deleteSample(String key) throws UnauthorizedException { Preconditions.checkNotNull(key, "Key should not be null"); return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null); } RefocusClient(EndpointConnector connector); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public Sample deleteSample(String key) throws UnauthorizedException { Preconditions.checkNotNull(key, "Key should not be null"); return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null); } RefocusClient(EndpointConnector connector); @Override boolean isAuthenticated(); Sample getSample(String key, List<String> fields); List<Sample> getSamples(String name); boolean upsertSamplesBulk(List<Sample> samples); Sample deleteSample(String key); List<Subject> getSubjects(List<String> fields); Subject getSubject(String key, List<String> fields); Subject getSubjectHierarchy(String key, String status); Subject postSubject(Subject subject); Subject patchSubject(Subject subject); Subject putSubject(Subject subject); Subject deleteSubject(String subjectKey); List<Aspect> getAspects(List<String> fields); Aspect getAspect(String key, List<String> fields); Aspect postAspect(Aspect aspect); Aspect patchAspect(Aspect aspect); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public Sample deleteSample(String key) throws UnauthorizedException { Preconditions.checkNotNull(key, "Key should not be null"); return executeAndRetrieveBody(svc().deleteSample(authorizationHeader(), key), null); } RefocusClient(EndpointConnector connector); @Override boolean isAuthenticated(); Sample getSample(String key, List<String> fields); List<Sample> getSamples(String name); boolean upsertSamplesBulk(List<Sample> samples); Sample deleteSample(String key); List<Subject> getSubjects(List<String> fields); Subject getSubject(String key, List<String> fields); Subject getSubjectHierarchy(String key, String status); Subject postSubject(Subject subject); Subject patchSubject(Subject subject); Subject putSubject(Subject subject); Subject deleteSubject(String subjectKey); List<Aspect> getAspects(List<String> fields); Aspect getAspect(String key, List<String> fields); Aspect postAspect(Aspect aspect); Aspect patchAspect(Aspect aspect);  }