/**
 * Copyright (c) 2016, German Neuroinformatics Node (G-Node)
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted under the terms of the BSD License. See
 * LICENSE file in the root of the Project.
 */

package org.g_node.srv;

/**
 * Unit tests for the {@link ModelUtils} class. Output and Error streams are redirected
 * from the console to a different PrintStream and reset after tests are finished
 * to avoid mixing tool error messages with actual test error messages.
 *
 * @author Michael Sonntag (sonntag@bio.lmu.de)
 */
public class ModelUtilsTest {

}

@@ -307,338 +307,1597 @@
 v;%0A%0A
-/**%0A * Unit tests for the %7B@link ModelUtils%7D class. Output and Error streams are redirected%0A * from the console to a different PrintStream and reset after tests are finished%0A * to avoid mixing tool error messages with actual test error messages.%0A *%0A * @author Michael Sonntag (sonntag@bio.lmu.de)%0A */%0Apublic class ModelUtilsTest %7B
+import com.hp.hpl.jena.rdf.model.Model;%0Aimport com.hp.hpl.jena.rdf.model.ModelFactory;%0Aimport java.net.URL;%0Aimport java.nio.file.Paths;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport org.g_node.micro.commons.RDFService;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0A/**%0A * Unit tests for the %7B@link ModelUtils%7D class.%0A *%0A * @author Michael Sonntag (sonntag@bio.lmu.de)%0A */%0Apublic class ModelUtilsTest %7B%0A%0A    private Model baseModel;%0A%0A    @Before%0A    public void setUp() %7B%0A        this.baseModel = ModelFactory.createDefaultModel();%0A    %7D%0A%0A    @Test%0A    public void testRemoveAnonProperties() throws Exception %7B%0A%0A        final URL testFileNameURL = this.getClass().getResource(%22/testFiles/RemoveAnonNodeTest.ttl%22);%0A        final String testFileName = Paths.get(testFileNameURL.toURI()).toFile().toString();%0A%0A        this.baseModel = RDFService.openModelFromFile(testFileName);%0A%0A        assertThat(this.baseModel.size()).isEqualTo(7);%0A%0A        this.baseModel.listObjects().forEachRemaining(%0A                obj -%3E %7B%0A                    if (obj.isURIResource() && obj.asResource().listProperties().hasNext()) %7B%0A                       ModelUtils.removeAnonProperties(obj.asResource().listProperties());%0A                    %7D%0A                %7D);%0A%0A        assertThat(this.baseModel.size()).isEqualTo(5);%0A    %7D%0A%0A    @Test%0A    public void testRemovePropertiesFromModel() throws Exception %7B%0A        System.out.println(%0A                String.join(%22%22, %22%5BTEST DEBUG%5D Remove properties; Model size: %22,%0A                        Long.toString(this.baseModel.size()))%0A        );%0A    %7D
 %0A%0A%7D%0A

Add remove anonymous node properties test