SendMessageHelper { public MessageActionResult sendMessages(List<ProtocolMessage> messages, List<AbstractRecord> records, TlsContext context) throws IOException { return sendMessages(messages, records, context, true); } SendMessageHelper(); MessageActionResult sendMessages(List<ProtocolMessage> messages, List<AbstractRecord> records,
            TlsContext context); MessageActionResult sendMessages(List<ProtocolMessage> messages, List<AbstractRecord> records,
            TlsContext context, boolean prepareMessages); void sendRecords(List<AbstractRecord> records, TlsContext context);  }
@Test public void testSendMessages() throws Exception { }
@Test public void testSendEmptyRecords() throws IOException { context.getConfig().setUseAllProvidedRecords(true); Record r = new Record(); r.setContentMessageType(ProtocolMessageType.HANDSHAKE); r.setMaxRecordLengthConfig(0); List<AbstractRecord> recordList = new LinkedList<>(); recordList.add(r); helper.sendMessages(new LinkedList<ProtocolMessage>(), recordList, context); assertArrayEquals(new byte[] { 22, 03, 03, 0, 0 }, ((ByteArrayOutputStream) transportHandler.getOutputStream()).toByteArray()); }