### Question:
AisMessageParser { AisMessage parseStaticDataReport(int partNumber, int id, String message, String source, int padBits) { if (partNumber == AbstractAisBStaticDataReport.PART_NUMBER_A) { return new AisBStaticDataReportPartA(message, source, padBits); } else if (partNumber == AbstractAisBStaticDataReport.PART_NUMBER_B) { return new AisBStaticDataReportPartB(message, source, padBits); } else { throw new AisParseException("Unsupported part number [" + partNumber + "]"); } } AisMessageParser();  AisMessageParser(AisExtractorFactory factory); AisMessage parse(String message, int padBits); AisMessage parse(String message, String source, int padBits);  }### Answer:
@Test(expected = AisParseException.class) public void testParseStaticDataReportWithInvalidPartNumberException() { AisExtractorFactory factory = createMock(AisExtractorFactory.class); AisMessageParser p = new AisMessageParser(); p.parseStaticDataReport(-1, 24, "H7PJ@:4UCBD6f6<57hhh001H5220", null, 0); }