### Question:
PcrSelection { @Override public final boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof PcrSelection)) { return false; } PcrSelection other = (PcrSelection) obj; if (!Arrays.equals(pcrSelect, other.pcrSelect)) { return false; } return true; } protected  PcrSelection();  PcrSelection(final byte[] pcrSelect);  PcrSelection(final long pcrSelectLong); @XmlAttribute(name = "SizeOfSelect", required = true) @XmlSchemaType(name = "unsignedShort") final int getSizeOfSelect(); final byte[] getPcrSelect(); final boolean isPcrSelected(final int pcrNumber); final String getMaskForTPM(); @Override final int hashCode(); @Override final boolean equals(final Object obj); final int getLength(); final byte[] getValue(); static final int ALL_PCRS_ON; }### Answer:
@Test public final void testEquals() { byte[] selectionBytes = {(byte) 0x80}; byte[] expectedSelectionBytes = {(byte) 0x80, OFF_BITS, OFF_BITS}; PcrSelection pcrSelectionFromArray = new PcrSelection(selectionBytes); PcrSelection pcrSelectionFromLong = new PcrSelection(1); Assert.assertEquals(pcrSelectionFromArray, pcrSelectionFromLong); Assert.assertTrue(pcrSelectionFromArray.isPcrSelected(0)); Assert.assertTrue(pcrSelectionFromLong.isPcrSelected(0)); Assert.assertEquals( pcrSelectionFromArray.getPcrSelect(), expectedSelectionBytes); Assert.assertEquals( pcrSelectionFromLong.getPcrSelect(), expectedSelectionBytes); }