### Question:
SimpleImaBaselineGenerator { public final SimpleImaBaseline generateBaselineFromIntegrityReport( final String baselineName, final IntegrityReport report) throws IMABaselineGeneratorException, NullPointerException { IMABaselineRecord imaBaselineRecord; if (baselineName == null) { LOGGER.error("null argument: baselineName"); throw new NullPointerException("baselineName"); } if (report == null) { LOGGER.error("null argument: report"); throw new NullPointerException("report"); } if (!report.contains(IMAReport.class)) { String msg = "no IMA report in the integrity report"; LOGGER.error(msg); throw new IMABaselineGeneratorException(msg); } IMAReport imaReport = report.extractReport(IMAReport.class); if (imaReport.getRecords().size() < 1) { String msg = "no IMA records in the report"; LOGGER.error(msg); throw new IMABaselineGeneratorException(msg); } SimpleImaBaseline newBaseline = new SimpleImaBaseline(baselineName); for (IMAMeasurementRecord imaRecord : imaReport.getRecords()) { imaBaselineRecord = new IMABaselineRecord(imaRecord.getPath(), imaRecord.getHash()); newBaseline.addToBaseline(imaBaselineRecord); } return newBaseline; }  final SimpleImaBaseline generateBaselineFromCSVFile(
            final String baselineName, final InputStream in); final SimpleImaBaseline generateBaselineFromIMAReport(
            final String baselineName, final IMAReport report); final SimpleImaBaseline generateBaselineFromIntegrityReport(
            final String baselineName, final IntegrityReport report); final void updateBaselineFromCSVFile(final SimpleImaBaseline baseline,
            final InputStream inStream);  }### Answer:
@Test(expectedExceptions = NullPointerException.class) public final void generateBaselineFromIntegrityReportNullIntegrityReport() throws Exception { SimpleImaBaselineGenerator simpleImaBaselineGenerator = new SimpleImaBaselineGenerator(); simpleImaBaselineGenerator.generateBaselineFromIntegrityReport("testname", null); }
@Test(expectedExceptions = NullPointerException.class) public final void generateBaselineFromIntegrityReportNullBaselineName() throws Exception { final IntegrityReport report = getIntegrityReport(DEFAULT_INTEGRITY_REPORT); final SimpleImaBaselineGenerator generator = new SimpleImaBaselineGenerator(); generator.generateBaselineFromIntegrityReport(null, report); }