OldRpcMessageWriter implements RpcMessageWriter { public static String buildHdr(String wkid, String winh, String prch, String wish) { StringBuilder sb = new StringBuilder(wkid); sb.append(";"); sb.append(winh); sb.append(";"); sb.append(prch); sb.append(";"); sb.append(wish); sb.append(";"); return strPack(sb.toString(), 3); } OldRpcMessageWriter(Writer w); void writeStartConnection(String hostname, String address, int localPort); void writeStopConnection(); void write(RpcRequest request); void flush(); static String buildApi(String n, String p, long f); static String buildHdr(String wkid, String winh, String prch, String wish); static String strPack(String n, int p); static String varPack(String n); static final String PREFIX; }
@Test public void testBuildHdr() { assertEquals("007XWB;;;;", OldRpcMessageWriter.buildHdr("XWB", "", "", "")); }