+ /**
+ * Testing appropriate ChannelHandler integration for JsonRpcDecoder, so that JSON strings written using an
+ * OutputStream connected to a ServerSocket of a Netty ServerBootstrap can be decoded properly.
+ */
+ @Test
+ public void testBasicFlow() throws Exception {
+ setupServer();
+ Socket socket = new Socket(serverurl, bootstrapper.getServerPort());
+ OutputStream outputStream = socket.getOutputStream();
+
+ int records = 20;
+
+ for (int i = 0; i < records; i++) {
+ writeJson(outputStream, 1);
+ writePartialFirst(outputStream);
+ outputStream.flush();
+ Thread.sleep(10);
+ writePartialLast(outputStream);