@Test public void upsertSamplesBulk() throws Exception { Response<List<Sample>> response = Response.success(Collections.singletonList(sample)); @SuppressWarnings("unchecked") Call<List<Sample>> responseCall = mock(Call.class); doReturn(response).when(responseCall).execute(); doReturn(request).when(responseCall).request(); doReturn(responseCall).when(svc).upsertSamplesBulk(any(), any()); boolean result = refocus.upsertSamplesBulk(Collections.singletonList(sample)); assertThat(result, is(true)); }
public boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException { Preconditions.checkNotNull(samples, "Samples should not be null"); return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), null)); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException { Preconditions.checkNotNull(samples, "Samples should not be null"); return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), null)); } }
RefocusClient extends AbstractRemoteClient<RefocusService> { public boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException { Preconditions.checkNotNull(samples, "Samples should not be null"); return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), null)); } RefocusClient(EndpointConnector connector); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException { Preconditions.checkNotNull(samples, "Samples should not be null"); return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), 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 boolean upsertSamplesBulk(List<Sample> samples) throws UnauthorizedException { Preconditions.checkNotNull(samples, "Samples should not be null"); return nonNull(executeAndRetrieveBody(svc().upsertSamplesBulk(authorizationHeader(), samples), 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);  }