### Question:
ExploratoryServiceImpl implements ExploratoryService { @Override public void updateClusterConfig(UserInfo userInfo, String project, String exploratoryName, List<ClusterConfig> config) { final String userName = userInfo.getName(); final String token = userInfo.getAccessToken(); final UserInstanceDTO userInstanceDTO = exploratoryDAO.fetchRunningExploratoryFields(userName, project, exploratoryName); EndpointDTO endpointDTO = endpointService.get(userInstanceDTO.getEndpoint()); final ExploratoryReconfigureSparkClusterActionDTO updateClusterConfigDTO = requestBuilder.newClusterConfigUpdate(userInfo, userInstanceDTO, config, endpointDTO); final String uuid = provisioningService.post(endpointDTO.getUrl() + EXPLORATORY_RECONFIGURE_SPARK, token, updateClusterConfigDTO, String.class); requestId.put(userName, uuid); exploratoryDAO.updateExploratoryFields(new ExploratoryStatusDTO() .withUser(userName) .withProject(project) .withExploratoryName(exploratoryName) .withConfig(config) .withStatus(UserInstanceStatus.RECONFIGURING.toString())); }  @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 testUpdateExploratoryClusterConfigWhenNotRunning() { when(exploratoryDAO.fetchRunningExploratoryFields(anyString(), anyString(), anyString())).thenThrow(new ResourceNotFoundException("EXCEPTION")); try { exploratoryService.updateClusterConfig(getUserInfo(), PROJECT, EXPLORATORY_NAME, singletonList(new ClusterConfig())); } catch (ResourceNotFoundException e) { assertEquals("EXCEPTION", e.getMessage()); } verify(exploratoryDAO).fetchRunningExploratoryFields(USER, PROJECT, EXPLORATORY_NAME); verifyNoMoreInteractions(exploratoryDAO); verifyZeroInteractions(requestBuilder, requestId, provisioningService); }