### Question:
ComputationalServiceImpl implements ComputationalService { @Override public List<ClusterConfig> getClusterConfig(UserInfo userInfo, String project, String exploratoryName, String computationalName) { return computationalDAO.getClusterConfig(userInfo.getName(), project, exploratoryName, computationalName); } @Inject  ComputationalServiceImpl(ProjectService projectService, ExploratoryDAO exploratoryDAO, ComputationalDAO computationalDAO,
									@Named(ServiceConsts.PROVISIONING_SERVICE_NAME) RESTService provisioningService,
									RequestBuilder requestBuilder, RequestId requestId, TagService tagService,
									EndpointService endpointService, InfrastructureTemplateService templateService); @Override ComputationalTemplatesDTO getComputationalNamesAndTemplates(UserInfo user, String project, String endpoint); @BudgetLimited @Override boolean createSparkCluster(UserInfo userInfo, SparkStandaloneClusterCreateForm form, @Project String project); @Override void terminateComputational(UserInfo userInfo, String project, String exploratoryName, String computationalName); @BudgetLimited @Override boolean createDataEngineService(UserInfo userInfo, ComputationalCreateFormDTO formDTO,
										   UserComputationalResource computationalResource, @Project String project); @Override void stopSparkCluster(UserInfo userInfo, String project, String expName, String compName); @BudgetLimited @Override void startSparkCluster(UserInfo userInfo, String expName, String compName, @Project String project); @Override void updateSparkClusterConfig(UserInfo userInfo, String project, String exploratoryName, String computationalName,
										 List<ClusterConfig> config); @Override Optional<UserComputationalResource> getComputationalResource(String user, String project, String exploratoryName,
																		String computationalName); @Override List<ClusterConfig> getClusterConfig(UserInfo userInfo, String project, String exploratoryName, String computationalName);  }### Answer:
@Test public void testGetClusterConfig() { when(computationalDAO.getClusterConfig(anyString(), anyString(), anyString(), anyString())).thenReturn(Collections.singletonList(getClusterConfig())); final List<ClusterConfig> clusterConfig = computationalService.getClusterConfig(getUserInfo(), PROJECT, EXPLORATORY_NAME, COMP_NAME); final ClusterConfig config = clusterConfig.get(0); assertEquals(1, clusterConfig.size()); assertEquals("test", config.getClassification()); assertNull(config.getConfigurations()); assertNull(config.getProperties()); }
@Test public void testGetClusterConfigWithException() { when(computationalDAO.getClusterConfig(anyString(), anyString(), anyString(), anyString())).thenThrow(new RuntimeException( "Exception")); expectedException.expectMessage("Exception"); expectedException.expect(RuntimeException.class); computationalService.getClusterConfig(getUserInfo(), PROJECT, EXPLORATORY_NAME, COMP_NAME); }