@Test
public void testGetBytesByteArrayInt() {

    final byte[] output = new byte[5];
    new Expectations(hash) {
        {
            hash.length();
            result = output.length;
            hash.getLong();
            result = 0x1234567890L;
        }
    };
    hash.getBytes(output, 0, output.length);
    assertArrayEquals(new byte[] { (byte) 0x90, 0x78, 0x56, 0x34, 0x12 }, output);
}