TunnelTrafficResult { public Object format() { Object[] frontendResult = frontend.toArray(); Object[] backendResult = backend.toArray(); Object[] result = new Object[3]; result[0] = tunnelId; result[1] = frontendResult; result[2] = backendResult; return result; } TunnelTrafficResult(String tunnelId, SessionTrafficResult frontendResult,
                               SessionTrafficResult backendResult); Object format(); static TunnelTrafficResult parse(Object obj); String getTunnelId(); SessionTrafficResult getFrontend(); SessionTrafficResult getBackend(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void format() { Object objects = result.format(); Assert.assertTrue(objects instanceof Object[]); Object[] data = (Object[]) objects; Assert.assertEquals(3, data.length); Assert.assertEquals(tunnelId, data[0]); Assert.assertEquals(frontend, SessionTrafficResult.parseFromArray((Object[]) data[1])); Assert.assertEquals(backend, SessionTrafficResult.parseFromArray((Object[]) data[2])); }