@Test public void getAspects() throws Exception { Aspect aspect = ImmutableAspect.builder().name("name").build(); Response<List<Aspect>>response = Response.success(Collections.singletonList(aspect)); @SuppressWarnings("unchecked") Call<Aspect>responseCall = mock(Call.class); doReturn(response).when(responseCall).execute(); doReturn(request).when(responseCall).request(); doReturn(responseCall).when(svc).getAspects(any(), any()); List<Aspect>results = refocus.getAspects(fields); assertThat(results.get(0).name(), is("name")); }
public List<Aspect> getAspects(List<String> fields) throws UnauthorizedException { return executeAndRetrieveBody(svc().getAspects(authorizationHeader(), fields), null); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public List<Aspect> getAspects(List<String> fields) throws UnauthorizedException { return executeAndRetrieveBody(svc().getAspects(authorizationHeader(), fields), null); } }
RefocusClient extends AbstractRemoteClient<RefocusService> { public List<Aspect> getAspects(List<String> fields) throws UnauthorizedException { return executeAndRetrieveBody(svc().getAspects(authorizationHeader(), fields), null); } RefocusClient(EndpointConnector connector); }
RefocusClient extends AbstractRemoteClient<RefocusService> { public List<Aspect> getAspects(List<String> fields) throws UnauthorizedException { return executeAndRetrieveBody(svc().getAspects(authorizationHeader(), fields), 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 List<Aspect> getAspects(List<String> fields) throws UnauthorizedException { return executeAndRetrieveBody(svc().getAspects(authorizationHeader(), fields), 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);  }