@Test
  public void test_322_17_Pause() throws Exception {
    WorkerStatusDAO workerStatus = WorkerDAOFactory.getInstance().getWorkerStatusDAO();
    req_094_Util.getWorkerStatus(WorkerStatus.ALLOCATED_FOR_BROKER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertEquals(workerStatus.getMasterPeerAddress(), peerID.getServiceID().toString());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertTrue(workerStatus.isAllocated());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());

    req_087_Util.pausePreparingAllocatedForBrokerWorker(component, wmc, prepFuture);

    req_094_Util.getWorkerStatus(WorkerStatus.OWNER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertEquals(workerStatus.getMasterPeerAddress(), peerID.getServiceID().toString());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertFalse(workerStatus.isAllocated());
  }
  @Test
  public void test_322_6_LoginSucceeded() throws Exception {
    WorkerStatusDAO workerStatus = WorkerDAOFactory.getInstance().getWorkerStatusDAO();
    req_094_Util.getWorkerStatus(WorkerStatus.ALLOCATED_FOR_BROKER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertEquals(workerStatus.getMasterPeerAddress(), peerID.getServiceID().toString());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertTrue(workerStatus.isAllocated());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());

    req_129_Util.loginAlreadyLoggedInIdle(component, peerPubKey, peerID, testStub);

    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertTrue(workerStatus.isAllocated());
    TestCase.assertTrue(workerStatus.isAllocatedForRemotePeer());
    TestCase.assertTrue(workerStatus.isAllocatedForBroker());
    TestCase.assertEquals(workerStatus.getRemotePeerPublicKey(), remotePeerID.getPublicKey());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());
  }
  @Test
  public void test_322_19_RemoteWorkerManagementClientIsDown() throws Exception {
    WorkerStatusDAO workerStatus = WorkerDAOFactory.getInstance().getWorkerStatusDAO();
    req_094_Util.getWorkerStatus(WorkerStatus.ALLOCATED_FOR_BROKER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertTrue(workerStatus.isAllocated());
    TestCase.assertFalse(workerStatus.isWorkingState());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());

    req_127_Util.notifyRemotePeerFailureAtPreparingAllocatedForRemoteBroker(
        component, remotePeerID);

    req_094_Util.getWorkerStatus(WorkerStatus.IDLE);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertFalse(workerStatus.isAllocated());
    TestCase.assertFalse(workerStatus.isWorkingState());
  }