@Test public void testWarnings() throws ParseException, TokeniserException { ArrayList<Warning> warnings = new ArrayList<>(); Policy p1 = Parser.parse("frame-src aaa", "https://origin", warnings); assertEquals("frame-src aaa", p1.show()); assertEquals(1, warnings.size()); assertEquals( "The frame-src directive is deprecated as of CSP version 1.1. Authors who wish to govern nested browsing contexts SHOULD use the child-src directive instead.", warnings.iterator().next().message); }