private void nullPropertyDescriptorMethod(boolean writeMethod) throws Exception {
        PropertyDescriptor internalPropertyDescriptor = (PropertyDescriptor)Whitebox.getInternalState(javaBeanPropertyDescriptor, "pd");
        if (writeMethod) {
            internalPropertyDescriptor.setWriteMethod(null);
        } else {
            internalPropertyDescriptor.setReadMethod(null);
        }
    }
Simulates that a garbage collection has happened and a reference in the
{@link PropertyDescriptor} has been {@code null}ed.

@param writeMethod {@code true} to null out the write method, {@code false}
                   to null out the read method
core/src/test/java/com/github/dozermapper/core/propertydescriptor/GetterSetterPropertyDescriptorTest.java