@@ -0,0 +1,1887 @@
+/**%0A * Copyright (c) 2015, German Neuroinformatics Node (G-Node)%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted under the terms of the BSD License. See%0A * LICENSE file in the root of the Project.%0A */%0A%0Apackage org.g_node.srv;%0A%0Aimport com.hp.hpl.jena.rdf.model.Literal;%0Aimport com.hp.hpl.jena.rdf.model.Model;%0Aimport com.hp.hpl.jena.rdf.model.ModelFactory;%0Aimport com.hp.hpl.jena.rdf.model.Property;%0Aimport com.hp.hpl.jena.rdf.model.Resource;%0Aimport com.hp.hpl.jena.vocabulary.RDFS;%0Aimport org.junit.Test;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Unit tests for the %7B@link RDFUtils%7D class.%0A *%0A * @author Michael Sonntag (sonntag@bio.lmu.de)%0A */%0Apublic class RDFUtilsTest %7B%0A%0A    /**%0A     * Method tests that a only a nonempty %7B@link Literal%7D is added to a Jena %7B@link Resource%7D.%0A     */%0A    @Test%0A    public void testAddNonEmptyLiteral() %7B%0A        final Model m = ModelFactory.createDefaultModel();%0A        final Resource r = m.createResource(%22testResource%22);%0A        final Property p = RDFS.comment;%0A        final String s = %22testComment%22;%0A%0A        assertThat(r.hasProperty(RDFS.comment)).isFalse();%0A%0A        RDFUtils.addNonEmptyLiteral(r, p, null);%0A        assertThat(r.hasProperty(p)).isFalse();%0A        assertThat(r.listProperties().toList().size()).isEqualTo(0);%0A%0A        RDFUtils.addNonEmptyLiteral(r, p, %22%22);%0A        assertThat(r.hasProperty(p)).isFalse();%0A        assertThat(r.listProperties().toList().size()).isEqualTo(0);%0A%0A        RDFUtils.addNonEmptyLiteral(r, p, s);%0A        assertThat(r.hasProperty(RDFS.comment)).isTrue();%0A        assertThat(r.listProperties().toList().size()).isEqualTo(1);%0A        assertThat(r.getProperty(RDFS.comment).getLiteral().toString())%0A                .isEqualTo(String.join(%22%22, s, %22%5E%5Ehttp://www.w3.org/2001/XMLSchema#string%22));%0A    %7D%0A%0A%7D%0A

add RDFUtils tests