ResponderIdParser extends Parser<ResponderId> { @Override public ResponderId parse() { ResponderId id = new ResponderId(); id.setIdLength(parseIntField(ExtensionByteLength.CERTIFICATE_STATUS_REQUEST_V2_RESPONDER_ID)); id.setId(parseByteArrayField(id.getIdLength().getValue())); return id; } ResponderIdParser(int startposition, byte[] array); @Override ResponderId parse();  }
@Test public void testParser() { parser = new ResponderIdParser(startParsing, payloadBytes); parsedId = parser.parse(); assertEquals(idLength, parsedId.getIdLength().getValue()); assertArrayEquals(id, parsedId.getId().getValue()); }