### Question:
DeviceInfoReport extends Report implements Serializable { public final boolean matchesKernelInfo(final Iterable<TpmWhiteListBaseline> tpmBaselines) { boolean match = false; if (tpmBaselines != null) { final OSInfo kernelOSInfo = getOSInfo(); for (final TpmWhiteListBaseline baseline : tpmBaselines) { final OSInfo baselineOSInfo = baseline.getOSInfo(); if(baselineOSInfo.getOSName().equalsIgnoreCase(kernelOSInfo.getOSName()) && baselineOSInfo.getOSVersion().equalsIgnoreCase(kernelOSInfo.getOSVersion())) { match = true; break; } } } return match; } DeviceInfoReport();  DeviceInfoReport(final NetworkInfo networkInfo, final OSInfo osInfo,
                            final FirmwareInfo firmwareInfo, final HardwareInfo hardwareInfo,
                            final TPMInfo tpmInfo);  DeviceInfoReport(final NetworkInfo networkInfo, final OSInfo osInfo,
                            final FirmwareInfo firmwareInfo, final HardwareInfo hardwareInfo,
                            final TPMInfo tpmInfo, final String clientApplicationVersion); final NetworkInfo getNetworkInfo(); final OSInfo getOSInfo(); final FirmwareInfo getFirmwareInfo(); HardwareInfo getHardwareInfo(); final TPMInfo getTPMInfo(); String getClientApplicationVersion(); @Override String getReportType(); final boolean matchesKernelInfo(final Iterable<TpmWhiteListBaseline> tpmBaselines); String getPaccorOutputString(); void setPaccorOutputString(String paccorOutputString); static final String NOT_SPECIFIED; static final int SHORT_STRING_LENGTH; static final int MED_STRING_LENGTH; static final int LONG_STRING_LENGTH; }### Answer:
@Test public final void testMatchesKernelInfo() { final DeviceInfoReport deviceInfoReport = new DeviceInfoReport(networkInfo, osInfo, firmwareInfo, hardwareInfo, tpmInfo); final List<TpmWhiteListBaseline> tpmBaselines = Arrays.asList( new TpmWhiteListBaseline("Best named TPM Baseline"), new TpmWhiteListBaseline("Bob"), new TpmWhiteListBaseline("Worst named Baseline. Ever.") ); final String osName = "test os name"; final String osVersion = "test os version"; final String manufacturer = "test manufacturer"; final String productName = "test product name"; final String version = "test version"; tpmBaselines.get(1).setFirmwareInfo(createTestFirmwareInfo()); tpmBaselines.get(1).setHardwareInfo( new HardwareInfo(manufacturer, productName, version, "wrong value", "wrong value", "wrong value")); tpmBaselines.get(1).setOSInfo(new OSInfo(osName, osVersion, "N/A", "not used", "ignored")); final boolean expected = true; Assert.assertEquals(deviceInfoReport.matchesKernelInfo(tpmBaselines), expected); }