@Override public Map<String, Object> toHash() throws IllegalStateException { return Do.map("key", key); }
@Test(timeout = 100) public void send() throws Exception { StreamConnector sa = new StreamConnector(); JsonConnector jsc = new JsonConnector(sa.getInputStream(), sa.getOutputStream()); jsc.send(Do.map("hello", "мыльня")); Map<String, Object> res = jsc.receive(); assertEquals(1, res.size()); assertEquals("мыльня", res.get("hello")); }
@Test public void send() throws Exception { StreamConnector sa = new StreamConnector(); BossConnector bsc = new BossConnector(sa.getInputStream(), sa.getOutputStream()); bsc.send(Do.map("hello", "мыльня")); Map<String, Object> res = bsc.receive(); assertEquals(1, res.size()); assertEquals("мыльня", res.get("hello")); }