@Test public void prefixes2() {

    // Some prefixes used
    String data2 = StrUtils.strjoinNL
        ("@prefix : <http://example/> ." ,
         "@prefix ex: <http://example/ex#> ." ,
         "@prefix notinuse: <http://example/whatever/> ." ,
         "" ,
         ":s1 :p :x1 ." ,
         ":s1 ex:p :x1 ."
         ) ;
    
    Graph graph1 = create(data2) ;
    PrefixMapping pmap = PrefixMappingUtils.calcInUsePrefixMapping(graph1) ;
    PrefixMapping pmapExpected = new PrefixMappingImpl() ;
    pmapExpected.setNsPrefix("", "http://example/") ;
    pmapExpected.setNsPrefix("ex", "http://example/ex#") ;
    Assert.assertEquals(2, size(pmap)) ;
    Assert.assertTrue(sameMapping(pmapExpected, pmap)) ;
    Assert.assertTrue(pmap.getNsPrefixURI("notinuse") == null) ;
}