ResponseParser { public Optional<Message> parse(final DERBuffer buffer) { parser.parse(buffer); return Optional.ofNullable(message); } ResponseParser(); Optional<Message> parse(final DERBuffer buffer);  }
@Test(groups = "transport", dataProvider = "response") public void parse(final byte[] berValue, final Message response) throws Exception { final ResponseParser parser = new ResponseParser(); Assert.assertEquals(parser.parse(new DefaultDERBuffer(berValue)).get(), response); }