CssFontFaceRule extends CssNestedAtRule { public Range resolveUnicodeRange() { Range range = null; for (CssDeclaration descriptor : getProperties()) { if ("unicode-range".equals(descriptor.getProperty())) { range = CssUtils.parseUnicodeRange(descriptor.getExpression()); } } return range; } CssFontFaceRule(); @Deprecated  CssFontFaceRule(String ruleParameters); List<CssDeclaration> getProperties(); @Override void addBodyCssDeclarations(List<CssDeclaration> cssDeclarations); @Override String toString(); Range resolveUnicodeRange();  }
@Test public void resolveUnicodeRangeTest() { CssFontFaceRule fontFaceRule = new CssFontFaceRule(); List<CssDeclaration> declarations = new ArrayList<>(); declarations.add(new CssDeclaration("unicode-range", "U+75")); fontFaceRule.addBodyCssDeclarations(declarations); Range range = fontFaceRule.resolveUnicodeRange(); Assert.assertNotNull(range); Assert.assertTrue(range.contains(117)); }