Skip to content

Commit

Permalink
[Fix] fix failing RetrievePrefixesModuleTest
Browse files Browse the repository at this point in the history
  • Loading branch information
rodionnv committed Jul 15, 2023
1 parent 56bbd9b commit f1cb7fa
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -7,6 +7,7 @@
import org.apache.jena.ontology.OntModel;
import org.apache.jena.ontology.OntModelSpec;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.shared.PrefixMapping;
import org.apache.jena.util.FileManager;
import org.apache.jena.util.FileUtils;
import org.apache.jena.vocabulary.OWL;
Expand All @@ -22,6 +23,7 @@
import java.util.LinkedHashMap;

import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.doReturn;

@ExtendWith(MockitoExtension.class)
class RetrievePrefixesModuleTest {
Expand Down Expand Up @@ -52,7 +54,9 @@ void setUp() {
@Test
void testExecuteSelf() {
given(ontoDocManager.getRegisteredOntologyUris()).willReturn(uri2ontModel.keySet());
uri2ontModel.forEach((key, value) -> given(ontoDocManager.getOntology(key)).willReturn(value));
uri2ontModel.forEach((key, value) -> {
doReturn(value).when(ontoDocManager).getOntology(key);
});

ExecutionContext inputExecutionContext = ExecutionContextFactory.createEmptyContext();

Expand Down

0 comments on commit f1cb7fa

Please sign in to comment.