AbstractStatefulHash implements StatefulHash { @Override public byte getByte() { return (byte) getInt(); }  @Override boolean supportsUnsafe(); @Override void update(byte[] input); @Override void update(byte[] input, int index, int length); @Override void update(ByteBuffer input); @Override void update(long address, long length); @Override byte[] getBytes(); @Override int getBytes(byte[] output, int index, int maxLength); @Override byte getByte(); @Override short getShort();  }
@Test public void testGetByte() { new Expectations(hash) { { hash.getInt(); result = 0x12345678; } }; assertEquals(0x78, hash.getByte()); }