public Response tpservice(TPSVCINFO svcinfo) throws ConnectionException, ConfigurationException {
   log.info("testTPConversation_short_service");
   int sendlen = 4;
   X_OCTET sendbuf = (X_OCTET) svcinfo.getConnection().tpalloc("X_OCTET", null);
   sendbuf.setByteArray("hi0".getBytes());
   svcinfo.getSession().tpsend(sendbuf, 0);
   sendbuf.setByteArray("hi1".getBytes());
   return new Response(Connection.TPSUCCESS, 0, sendbuf, 0);
 }
  private void processDomainCommand(String command, int expectation)
      throws ConnectionException, ConfigurationException {
    byte[] toSend = command.getBytes();
    X_OCTET buffer = (X_OCTET) connection.tpalloc("X_OCTET", null);
    buffer.setByteArray(toSend);

    Response response = connection.tpcall("BTDomainAdmin", buffer, 0);

    byte[] responseData = ((X_OCTET) response.getBuffer()).getByteArray();
    assertEquals(expectation, responseData[0]);
  }