@Test
/**
 * tests comparison with an unknown property name
 *
 * <p>test that a <code>NullPointerException</code> is thrown when the list of property names contains a property name
 * that does not exist in the first argument to  @{link  org.kuali.rice.krad.util.BeanPropertyComparator#compare(java.lang.Object, java.lang.Object)}</p>

 */
public void testCompare_unknownPropertyNames() {
    List unknownProperties = Arrays.asList(new String[] { "one", "two", "three" });
    BeanPropertyComparator bpc = new BeanPropertyComparator(unknownProperties);
    A a = new A("something", new Integer(0), Boolean.valueOf(false));
    B b = new B("something else", new Integer(1), Boolean.valueOf(true));
    boolean failedAsExpected = false;
    try {
        bpc.compare(a, b);
    }
    catch (BeanComparisonException e) {
        if (e.getCause() instanceof NullPointerException) {
            failedAsExpected = true;
        }
    }
    Assert.assertTrue(failedAsExpected);
}