Code example for URI

Methods: isAbsolute

0
      assertTrue(e instanceof IllegalStateException);
    } 
  } 
 
  public final void testContentCache() throws Exception { 
    InputSource is = new InputSource(URI.create("test:///foo.js"));
    Map<InputSource, CharSequence> sourceMap = Maps.newHashMap();
    @SuppressWarnings("unused") 
    ParseTreeNode node = new ParserContext(DevNullMessageQueue.singleton())
      .withSourceMap(sourceMap)
      .withInput(is)
      .withInput("var j = 1;") 
      .build(); 
    assertTrue(sourceMap.containsKey(is));
    assertEquals("var j = 1;", sourceMap.get(is));
  } 
 
  public final void testMinimalGuessHtmlContentType() throws Exception { 
    ParseTreeNode node = new ParserContext(DevNullMessageQueue.singleton())
      .withInput("<b>hi mom</b>") 
Experience pair programming with AI  Get Codota for Java