@Test
public void testBinary() throws RepositoryException, IOException {
byte[] value1 = new byte[] { 0x01, 0x01, 0x03 };
this.node1.setProperty("prop1", new BinaryValue(value1).getBinary());
Property prop1 = this.node1.getProperty("prop1");
assertArrayEquals(value1, IOUtils.toByteArray(prop1.getBinary().getStream()));
assertArrayEquals(value1, IOUtils.toByteArray(prop1.getValue().getBinary().getStream()));
byte[] value2 = new byte[] { 0x04, 0x05, 0x06 };
prop1.setValue(new BinaryValue(value2).getBinary());
assertArrayEquals(value2, IOUtils.toByteArray(prop1.getBinary().getStream()));
assertArrayEquals(value2, IOUtils.toByteArray(prop1.getValue().getBinary().getStream()));
}