private Principal getFirstPrincipal(NotesConnectorDocument document,
String propertyName) throws Exception {
Property property = document.findProperty(propertyName);
assertNotNull("Missing " + propertyName, property);
Value value = property.nextValue();
assertNotNull("Missing value for " + propertyName, value);
assertTrue("Not PrincipalValue: " + propertyName,
value instanceof PrincipalValue);
return ((PrincipalValue) value).getPrincipal();
}