DefaultStudyService implements StudyService, PaginatedDataSource<Study> { @Override public Study get(long studyId) throws IOException { return studyStore.get(studyId); }  @Override Study get(long studyId); @Override AuthorizationManager getAuthorizationManager(); ProjectStore getProjectStore(); void setProjectStore(ProjectStore projectStore); StudyStore getStudyStore(); void setStudyStore(StudyStore studyStore); void setAuthorizationManager(AuthorizationManager authorizationManager); void setNamingSchemeHolder(NamingSchemeHolder namingSchemeHolder); @Override DeletionStore getDeletionStore(); @Override Collection<Study> listByProjectId(long projectId); @Override Collection<Study> listBySearch(String query); @Override Collection<Study> listWithLimit(long limit); @Override long create(Study study); @Override long update(Study study); @Override long count(Consumer<String> errorHandler, PaginationFilter... filter); @Override List<Study> list(Consumer<String> errorHandler, int offset, int limit, boolean sortDir, String sortCol, PaginationFilter... filter); @Override ValidationResult validateDeletion(Study object);  }
@Test public void testGetStudyByIdThrows() throws IOException { Study db = new StudyImpl(); db.setId(1L); db.setName("b"); db.setDescription("mt"); when(studyStore.get(1L)).thenReturn(db); assertEquals(db, sut.get(1L)); }