### Question:
ExploratoryServiceImpl implements ExploratoryService { @Override public void updateProjectExploratoryStatuses(String project, String endpoint, UserInstanceStatus status) { exploratoryDAO.fetchProjectExploratoriesWhereStatusNotIn(project, endpoint, TERMINATED, FAILED) .forEach(ui -> updateExploratoryStatus(project, ui.getExploratoryName(), status, ui.getUser())); }  @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 updateProjectExploratoryStatuses() { when(exploratoryDAO.fetchProjectExploratoriesWhereStatusNotIn(anyString(), anyString(), anyVararg())) .thenReturn(singletonList(userInstance)); when(exploratoryDAO.updateExploratoryStatus(any(StatusEnvBaseDTO.class))).thenReturn(mock(UpdateResult.class)); doNothing().when(computationalDAO).updateComputationalStatusesForExploratory(anyString(), anyString(), anyString(), any(UserInstanceStatus.class), any(UserInstanceStatus.class), anyVararg()); exploratoryService.updateProjectExploratoryStatuses("project", "endpoint", UserInstanceStatus.TERMINATED); statusEnvBaseDTO = getStatusEnvBaseDTOWithStatus("terminated"); verify(exploratoryDAO).fetchProjectExploratoriesWhereStatusNotIn("project", "endpoint", UserInstanceStatus.TERMINATED, UserInstanceStatus.FAILED); verify(exploratoryDAO).updateExploratoryStatus(refEq(statusEnvBaseDTO, "self")); verify(computationalDAO).updateComputationalStatusesForExploratory(USER, PROJECT, EXPLORATORY_NAME, UserInstanceStatus.TERMINATED, UserInstanceStatus.TERMINATED, UserInstanceStatus.TERMINATED, UserInstanceStatus.FAILED); verifyNoMoreInteractions(exploratoryDAO, computationalDAO); }