}
public void test(TestHarness harness)
{
// One with name is found as "best" match
MediaSizeName name =
MediaSize.findMedia(111f, 222f, Size2DSyntax.INCH);
harness.check(name == MediaSizeName.JIS_B0);
// Register a user MediaSize object
MyMediaSize myMediaSize =
new MyMediaSize(111f, 222f, Size2DSyntax.INCH);
// Now if it is added to the cache it must be found by
// findMedia as it is the exact match
MediaSizeName name2 =
MediaSize.findMedia(111f, 222f, Size2DSyntax.INCH);
harness.check(name2 == null);
}