2727import static org .junit .Assert .assertFalse ;
2828import static org .junit .Assert .assertNotNull ;
2929import static org .junit .Assert .assertThat ;
30+ import static org .junit .Assert .assertThrows ;
3031import static org .junit .Assert .assertTrue ;
3132import static org .junit .Assert .fail ;
3233import static org .junit .Assume .assumeTrue ;
@@ -2348,6 +2349,7 @@ protected void append(ILoggingEvent e) {
23482349 }
23492350
23502351 @ Test
2352+ @ Ignore ("OAK-11561" )
23512353 public void testConsistencyOfNameConversion () throws RepositoryException {
23522354 NamespaceRegistry namespaceRegistry = getAdminSession ().getWorkspace ().getNamespaceRegistry ();
23532355 Root root = new RootProviderService ().createReadOnlyRoot (EmptyNodeState .EMPTY_NODE );
@@ -2366,14 +2368,14 @@ public void testConsistencyOfNameConversion() throws RepositoryException {
23662368 namespaceRegistry .registerNamespace ("sample" , "http://www.example.com" );
23672369 namespaceRegistry .registerNamespace ("globalPrefix" , "http://www.secondexample.com" );
23682370
2369- //should fail (but doesn't, see OAK-xyz) , because the prefix foo is not registered
2370- assertEquals ( "foo:bar" , sessionContext .getJcrName ("foo:bar" ));
2371+ //should fail, because the prefix foo is not registered
2372+ assertThrows ( IllegalStateException . class , () -> sessionContext .getJcrName ("foo:bar" ));
23712373
23722374 //create a local mapping for a completely unrelated namespace
23732375 sessionContext .getSession ().setNamespacePrefix ("localPrefix" , "http://www.secondexample.com" );
23742376
2375- //Now (in the presence of a local re-mapping) it will fail
2376- assertEquals ( "foo:bar" , sessionContext .getJcrName ("foo:bar" ));
2377+ //verify that the behavior of getJcrName did not change
2378+ assertThrows ( IllegalStateException . class , () -> sessionContext .getJcrName ("foo:bar" ));
23772379 }
23782380
23792381 private static ch .qos .logback .classic .Logger rootLogger () {
0 commit comments