QueryResult<Study> result = studyDBAdaptor.insert(project, study, options); study = result.getResult().get(0);
/*** * The test will check whether it is possible to create a new study using an alias that is already being used, but on a different * project. */ @Test public void createStudySameAliasDifferentProject() throws CatalogException { QueryResult<Study> ph1 = catalogStudyDBAdaptor.insert(user1.getProjects().get(0), new Study("Phase 1", "ph1", Study.Type.CASE_CONTROL, "", new Status(), null, 1), null); assertTrue("It is impossible creating an study with an existing alias on a different project.", ph1.getNumResults() == 1); }