private void assertPropertyEquals(String message, Property expectedProperty,
Property actualProperty) throws RepositoryException, IOException {
assertNotNull(message, expectedProperty);
assertNotNull(message, actualProperty);
Value expectedValue = expectedProperty.nextValue();
Value actualValue = actualProperty.nextValue();
if (expectedValue instanceof BinaryValue) {
assertTrue(actualValue.getClass().toString(),
actualValue instanceof BinaryValue);
assertBinaryValueEquals(message, (BinaryValue) expectedValue,
(BinaryValue) actualValue);
} else {
assertEquals(message, expectedValue.toString(), actualValue.toString());
}
}