void (FontPreferences fontPreferences, java.util.List<String> expectedRealFontFamilies, java.util.List<String> expectedEffectiveFontFamilies, String expectedFontFamily, Object... namesAndSizes) { assertEquals("Wrong real font families", expectedRealFontFamilies, fontPreferences.getRealFontFamilies()); assertEquals("Wrong effective font families", expectedEffectiveFontFamilies, fontPreferences.getEffectiveFontFamilies()); assertEquals("Wrong font family", expectedFontFamily, fontPreferences.getFontFamily()); for (int i = 0; i < namesAndSizes.length - 1; ) { String fontName = (String)namesAndSizes[i++]; Number fontSize = (Number)namesAndSizes[i++]; assertEquals("Wrong hasSize", fontSize != null, fontPreferences.hasSize(fontName)); assertEquals("Wrong font size", fontSize == null ? (float)FontPreferences.DEFAULT_FONT_SIZE : fontSize.floatValue(), fontPreferences.getSize2D(fontName), 0.001f); } }