Skip to content

Commit 453b8e1

Browse files
namedgraphclaude
andcommitted
Fix ProxyRequestFilterTest after ontology injection added
Set filter.ontology = Optional.empty() in setUp() so existing tests reach the proxy/NotAllowed paths they were designed to test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 24c5d9b commit 453b8e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/com/atomgraph/linkeddatahub/server/filter/request/ProxyRequestFilterTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.atomgraph.client.MediaTypes;
2020
import com.atomgraph.client.util.DataManager;
2121
import com.atomgraph.linkeddatahub.server.security.AgentContext;
22+
import org.apache.jena.ontology.Ontology;
2223
import com.atomgraph.linkeddatahub.server.util.URLValidator;
2324
import com.atomgraph.linkeddatahub.vocabulary.LAPP;
2425
import jakarta.ws.rs.NotAllowedException;
@@ -34,6 +35,7 @@
3435
import java.io.IOException;
3536
import java.net.URI;
3637
import java.util.List;
38+
import java.util.Optional;
3739
import org.apache.jena.query.ResultSet;
3840
import org.apache.jena.rdf.model.Model;
3941
import org.apache.jena.rdf.model.Resource;
@@ -60,6 +62,7 @@ public class ProxyRequestFilterTest
6062
@Mock com.atomgraph.linkeddatahub.Application system;
6163
@Mock MediaTypes mediaTypes;
6264
@Mock Request request;
65+
@Mock Ontology ontology;
6366

6467
@InjectMocks ProxyRequestFilter filter;
6568

@@ -85,6 +88,7 @@ public void setUp()
8588
when(system.getDataManager()).thenReturn(dataManager);
8689
when(dataManager.isMapped(anyString())).thenReturn(false);
8790
when(system.isEnableLinkedDataProxy()).thenReturn(false);
91+
filter.ontology = Optional.empty();
8892
}
8993

9094
/**

0 commit comments

Comments
 (0)