Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/287#discussion_r144312642 --- Diff: jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDataset.java --- @@ -108,4 +108,12 @@ assertFalse(model1.isIsomorphicWith(ds.getNamedModel(graphName))) ; assertTrue(model2.isIsomorphicWith(ds.getNamedModel(graphName))) ; } + + @Test public void dataset_06() + { + String graphName = "http://example/" ; + Dataset ds = createDataset() ; + ds.addNamedModel(graphName, model1) ; + assertFalse("Dataset should not be empty after a named graph has been added!", ds.isEmpty()); + } --- End diff -- This is a test passes because `model1` is not empty - not because it is used as a named graphs. ``` DatasetGraph dsg = DatasetGraphFactory.createTxnMem(); // or createGeneral Graph g = GraphFactory.createGraphMem(); dsg.addGraph(NodeFactory.createURI("http;//example/g"), g); boolean b = dsg.isEmpty(); System.out.println(b) ; ``` prints "true".
---