### Question:
IMAReport extends Report { public final void addRecord(final IMAMeasurementRecord record) { if (record == null) { LOGGER.error("null record"); throw new NullPointerException("record"); } imaRecords.add(record); LOGGER.debug("record added: {}", record); } IMAReport(); @Override final String getReportType(); final String getBootcycleId(); final void setBootcycleId(final String bootcycleId); final int getIndex(); final void setIndex(final int index); @JsonIgnore Set<IMAMeasurementRecord> getRecords(); final void addRecord(final IMAMeasurementRecord record); final boolean removeRecord(final IMAMeasurementRecord record); final boolean isFullReport(); int getRecordCount();  }### Answer:
@Test public final void addRecord() { IMAReport report = new IMAReport(); IMAMeasurementRecord record; record = getTestRecord(DEFAULT_PATH, DEFAULT_DIGEST); report.addRecord(record); Set<IMAMeasurementRecord> records = report.getRecords(); Set<IMAMeasurementRecord> expectedRecords = new LinkedHashSet<>(); expectedRecords.add(record); Assert.assertEquals(records, expectedRecords); }
@Test(expectedExceptions = NullPointerException.class) public final void addNullRecord() { IMAReport report = new IMAReport(); report.addRecord(null); }