### Question:
DatasourceServiceImpl implements DatasourceService, Constants { @Override public List<Datasource> getAllDatasourceDetails() { return datasourceRepository.findAll(); }  @Override List<Datasource> getAllDatasourceDetails();  }### Answer:
@Test public void getAllDatasourceDetailsTest() throws Exception { when(datasourceRepository.findAll()).thenReturn(new ArrayList<>()); assertThat(datasourceService.getAllDatasourceDetails().size(), is(0)); }