use of org.obiba.magma.MagmaRuntimeException in project mica2 by obiba.
the class CollectedDatasetServiceTest method testDatasourceConnectionErrorIsIgnoredForDraft.
@Test
public void testDatasourceConnectionErrorIsIgnoredForDraft() {
RestDatasource r = mock(RestDatasource.class);
when(r.getValueTable(anyString())).thenThrow(new MagmaRuntimeException());
when(opalService.getDatasource(anyString(), anyString())).thenReturn(r);
when(individualStudyService.findDraft(anyString())).thenReturn(study);
when(studyDatasetStateRepository.findOne(anyString())).thenReturn(state);
collectedDatasetService.save(dataset);
}
Aggregations