### Question:
ExploratoryServiceImpl implements ExploratoryService { @Override public List<ClusterConfig> getClusterConfig(UserInfo user, String project, String exploratoryName) { return exploratoryDAO.getClusterConfig(user.getName(), project, exploratoryName); }  @BudgetLimited @Override String start(UserInfo userInfo, String exploratoryName, @Project String project); @Override String stop(UserInfo userInfo, String project, String exploratoryName); @Override String terminate(UserInfo userInfo, String project, String exploratoryName); @BudgetLimited @Override String create(UserInfo userInfo, Exploratory exploratory, @Project String project); @Override void updateProjectExploratoryStatuses(String project, String endpoint, UserInstanceStatus status); @Override void updateClusterConfig(UserInfo userInfo, String project, String exploratoryName, List<ClusterConfig> config); @Override Optional<UserInstanceDTO> getUserInstance(String user, String project, String exploratoryName); @Override Optional<UserInstanceDTO> getUserInstance(String user, String project, String exploratoryName, boolean includeCompResources); @Override List<UserInstanceDTO> findAll(); @Override List<UserInstanceDTO> findAll(Set<ProjectDTO> projects); @Override List<ClusterConfig> getClusterConfig(UserInfo user, String project, String exploratoryName); @Override ExploratoryCreatePopUp getUserInstances(UserInfo user);  }### Answer:
@Test public void testGetClusterConfig() { when(exploratoryDAO.getClusterConfig(anyString(), anyString(), anyString())).thenReturn(Collections.singletonList(getClusterConfig())); final List<ClusterConfig> clusterConfig = exploratoryService.getClusterConfig(getUserInfo(), PROJECT, EXPLORATORY_NAME); assertEquals(1, clusterConfig.size()); assertEquals("classification", clusterConfig.get(0).getClassification()); verify(exploratoryDAO).getClusterConfig(getUserInfo().getName(), PROJECT, EXPLORATORY_NAME); verifyNoMoreInteractions(exploratoryDAO); }
@Test public void testGetClusterConfigWithException() { when(exploratoryDAO.getClusterConfig(anyString(), anyString(), anyString())).thenThrow(new RuntimeException("Exception")); expectedException.expect(RuntimeException.class); expectedException.expectMessage("Exception"); exploratoryService.getClusterConfig(getUserInfo(), PROJECT, EXPLORATORY_NAME); }