public void runTests() throws Throwable {
    init();

    declare("Test connection before Suspend");

    assertTrue("positive write", client.canWrite());
    assertTrue("positive read", server.canRead());

    declare("Test connection after Suspend");
    TestUtil.suspendMidp();
    TestUtil.sleep();

    assertTrue("negative write", !client.canWrite());
    assertTrue("negative read", !server.canRead());

    declare("Test connection after Resume");
    TestUtil.resumeMidp();
    TestUtil.sleep();

    assertTrue("negative write2", !client.canWrite());
    assertTrue("negative read2", !server.canRead());

    client.closeAll();
    server.closeAll();
  }
 private void init() {
   TestUtil.setNoVMSuspendMode();
   server = new ServerSide();
   TestUtil.sleep(1000);
   client = new ClientSide();
   client.waitReady();
   server.waitReady();
 }