@Test
public void using_generics()
{
ClassPropertyAdapter cpa1 = _access.getAdapter(StringLongPair.class);
PropertyAdapter pa1 = cpa1.getPropertyAdapter("key");
assertSame(pa1.getType(), String.class);
assertTrue(pa1.isCastRequired());
PropertyAdapter pa2 = cpa1.getPropertyAdapter("value");
assertSame(pa2.getType(), Long.class);
assertTrue(pa2.isCastRequired());
// On the base class, which defines the generic parameter type variables,
// the properties just look like Object.
ClassPropertyAdapter cpa2 = _access.getAdapter(Pair.class);
pa1 = cpa2.getPropertyAdapter("key");
assertSame(pa1.getType(), Object.class);
assertFalse(pa1.isCastRequired());
pa2 = cpa2.getPropertyAdapter("value");
assertSame(pa2.getType(), Object.class);
assertFalse(pa2.isCastRequired());
}