### Question:
TPMMeasurementRecord extends ExaminableRecord { public static void checkForValidPcrId(final int pcrId) { if (pcrId < MIN_PCR_ID || pcrId > MAX_PCR_ID) { final String msg = String.format("invalid PCR ID: %d", pcrId); LOGGER.error(msg); throw new IllegalArgumentException(msg); } } TPMMeasurementRecord(final int pcrId, final Digest hash);  TPMMeasurementRecord(final int pcrId, final String hash);  TPMMeasurementRecord(final int pcrId, final byte[] hash); protected  TPMMeasurementRecord(); static void checkForValidPcrId(final int pcrId); int getPcrId(); Digest getHash(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static final int MIN_PCR_ID; static final int MAX_PCR_ID; static final int SHA_BYTE_LENGTH; static final int SHA_256_BYTE_LENGTH; }### Answer:
@Test public final void testCheckForValidPcrId() { final int minPcrId = TPMMeasurementRecord.MIN_PCR_ID; final int maxPcrId = TPMMeasurementRecord.MAX_PCR_ID; for (int i = minPcrId; i < maxPcrId; i++) { TPMMeasurementRecord.checkForValidPcrId(i); } }
@Test(expectedExceptions = IllegalArgumentException.class) public final void testCheckForValidPcrIdNegative() { final int pcrId = -1; TPMMeasurementRecord.checkForValidPcrId(pcrId); }
@Test(expectedExceptions = IllegalArgumentException.class) public final void testCheckForValidPcrIdInvalidId() { final int pcrId = 35; TPMMeasurementRecord.checkForValidPcrId(pcrId); }