### Question:
AISTargetDynamicParser extends AbstractParser implements ParserInfo { @ParseMethod(start = "line", whiteSpace="whiteSpace") public abstract AISTargetDynamic parse(String line);  @ParseMethod(start = "line", whiteSpace="whiteSpace") abstract AISTargetDynamic parse(String line); @ParseMethod(start = "lines", whiteSpace="whiteSpace") abstract void parse(I input, @ParserContext("consumer") Consumer<AISTargetDynamic> consumer); @RecoverMethod void recover(
            @ParserContext(ParserConstants.InputReader) InputReader reader,
            @ParserContext(ParserConstants.ExpectedDescription) String expected,
            @ParserContext(ParserConstants.LastToken) String got,
            @ParserContext(ParserConstants.Exception) Throwable thr
            ); static final AISTargetDynamicParser PARSER; }### Answer:
@Test public void test1() { AISTargetDynamicParser parser = AISTargetDynamicParser.PARSER; AISTargetDynamic atd = parser.parse("#Msg Timestamp Location Course Speed Heading Channel Assigned"); assertNull(atd); atd = parser.parse("Msg18 2019-07-14T21:10:54.127Z 16°3.49'S 145°37.26'W 42.0 0.2 351 - false"); assertEquals(MessageTypes.StandardClassBCSPositionReport, atd.getMessageType()); assertEquals(Instant.parse("2019-07-14T21:10:54.127Z"), atd.getTimestamp()); assertEquals(-16-3.49/60, atd.getLatitude(), 1e-8); assertEquals(-145-37.26/60, atd.getLongitude(), 1e-6); assertEquals(42F, atd.getCourse(), 1e-10F); assertEquals(0.2F, atd.getSpeed(), 1e-10F); assertEquals(351, atd.getHeading()); assertEquals('-', atd.getChannel()); assertFalse(atd.isAssignedMode()); }
@Test public void test2() { Path path = Paths.get("src\\test\\resources\\230123250.log"); AISTargetDynamicParser parser = AISTargetDynamicParser.PARSER; parser.parse(path, (t)->System.err.println(t)); }
@Test public void test3() { AISTargetDynamicParser parser = AISTargetDynamicParser.PARSER; AISTargetDynamic atd = parser.parse("Msg18 1567210381411 17°59.26'S 159°49.59'W 251.3 5.7 511 B false"); assertEquals(Instant.ofEpochMilli(1567210381411L), atd.getTimestamp()); }