@Test
/**
 * tests that a ClassCastException is thrown when comparing beans that each have a property with the same name but of different object type
 */
public void testCompare_propertyTypeMismatch() {

    List mismatchedProperties = Arrays.asList(new String[] { "i", "b" });
    BeanPropertyComparator bpc = new BeanPropertyComparator(mismatchedProperties);
    A a = new A("something", new Integer(0), Boolean.valueOf(false));
    C c = new C("something else", 1, true);
    boolean failedAsExpected = false;
    try {
        bpc.compare(a, c);
    }
    catch (ClassCastException e) {
        failedAsExpected = true;
    }
    Assert.assertTrue(failedAsExpected);
}