@Test public void should_return_enabled_publishers_when_failed_to_acquire_lock() { when(agentDAO.getNumOtherAliveAgents(eq(customerId), eq(jvmUuid), any())).thenReturn(1); when(agentDAO.isEnvironmentEnabled(eq(customerId), eq(jvmUuid))).thenReturn(TRUE); val response = agentStateManager.updateAgentState(customerData, jvmUuid, appName, environment); assertThat(response, is(true)); }
@Override @Transactional @SneakyThrows public boolean updateAgentState( CustomerData customerData, String jvmUuid, String appName, String environment) { return doUpdateAgentState(customerData, jvmUuid, appName, environment); }
AgentStateManagerImpl implements AgentStateManager { @Override @Transactional @SneakyThrows public boolean updateAgentState( CustomerData customerData, String jvmUuid, String appName, String environment) { return doUpdateAgentState(customerData, jvmUuid, appName, environment); } }
AgentStateManagerImpl implements AgentStateManager { @Override @Transactional @SneakyThrows public boolean updateAgentState( CustomerData customerData, String jvmUuid, String appName, String environment) { return doUpdateAgentState(customerData, jvmUuid, appName, environment); }  }
AgentStateManagerImpl implements AgentStateManager { @Override @Transactional @SneakyThrows public boolean updateAgentState( CustomerData customerData, String jvmUuid, String appName, String environment) { return doUpdateAgentState(customerData, jvmUuid, appName, environment); }  @Override @Transactional @SneakyThrows boolean updateAgentState(
      CustomerData customerData, String jvmUuid, String appName, String environment); }
AgentStateManagerImpl implements AgentStateManager { @Override @Transactional @SneakyThrows public boolean updateAgentState( CustomerData customerData, String jvmUuid, String appName, String environment) { return doUpdateAgentState(customerData, jvmUuid, appName, environment); }  @Override @Transactional @SneakyThrows boolean updateAgentState(
      CustomerData customerData, String jvmUuid, String appName, String environment);  }