@Test
@SuppressWarnings("unchecked")
public void getDescription() throws Exception {

    // Mock property node
    final Property description = Mockito.when(Mockito.mock(Property.class).getString()).thenReturn("Node for testing").getMock();
    final Node node = Mockito.mock(Node.class);
    Mockito.when(node.getProperty(JcrExtensibleType.DESCRIPTION))
        .thenReturn(description)
        .thenThrow(PathNotFoundException.class);
    // Test description
    final JcrUserFieldDescriptor userField = new JcrUserFieldDescriptor(node, Mockito.mock(PropertyDefinition.class));
    Assert.assertEquals("Node for testing", userField.getDescription());
    Assert.assertNull(userField.getDescription());
}