### Question:
IOSample { public int getDigitalHSBMask() { return digitalHSBMask; } IOSample(byte[] ioSamplePayload); int getDigitalHSBMask(); int getDigitalLSBMask(); int getDigitalMask(); boolean hasDigitalValues(); boolean hasDigitalValue(IOLine ioLine); HashMap<IOLine, IOValue> getDigitalValues(); IOValue getDigitalValue(IOLine ioLine); int getAnalogMask(); boolean hasAnalogValues(); boolean hasAnalogValue(IOLine ioLine); HashMap<IOLine, Integer> getAnalogValues(); Integer getAnalogValue(IOLine ioLine); boolean hasPowerSupplyValue(); int getPowerSupplyValue(); static ArrayList<IOSample> parseIOSamples(byte[] samplePayload); @Override String toString(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testGetDigitalHSBMask() { IOSample ioSample = new IOSample(IO_DATA_ONLY_DIGITAL); int expected = IO_DATA_ONLY_DIGITAL[1] & 0x7F; int result = ioSample.getDigitalHSBMask(); assertThat(result, is(equalTo(expected))); }