@Test public void testGetPrefixes() throws Exception { NamespaceRegistry delegate = mock(NamespaceRegistry.class); NamespaceRegistryFacade facade = getFacade(delegate); final String[] prefixes = new String[]{"jcr", "nt", "oak"}; when(delegate.getPrefixes()).thenReturn(prefixes); assertSame("should be same", prefixes, facade.getPrefixes()); }
@Override public String[] getPrefixes() throws RepositoryException { return delegate.getPrefixes(); }
NamespaceRegistryFacade implements NamespaceRegistry { @Override public String[] getPrefixes() throws RepositoryException { return delegate.getPrefixes(); } }
NamespaceRegistryFacade implements NamespaceRegistry { @Override public String[] getPrefixes() throws RepositoryException { return delegate.getPrefixes(); } @SuppressWarnings("WeakerAccess")  NamespaceRegistryFacade(@NotNull NamespaceRegistry delegate); }
NamespaceRegistryFacade implements NamespaceRegistry { @Override public String[] getPrefixes() throws RepositoryException { return delegate.getPrefixes(); } @SuppressWarnings("WeakerAccess")  NamespaceRegistryFacade(@NotNull NamespaceRegistry delegate); @Override String[] getPrefixes(); @Override String[] getURIs(); @Override String getURI(String prefix); @Override String getPrefix(String uri); @Override void registerNamespace(String prefix, String uri); @Override void unregisterNamespace(String prefix); }
NamespaceRegistryFacade implements NamespaceRegistry { @Override public String[] getPrefixes() throws RepositoryException { return delegate.getPrefixes(); } @SuppressWarnings("WeakerAccess")  NamespaceRegistryFacade(@NotNull NamespaceRegistry delegate); @Override String[] getPrefixes(); @Override String[] getURIs(); @Override String getURI(String prefix); @Override String getPrefix(String uri); @Override void registerNamespace(String prefix, String uri); @Override void unregisterNamespace(String prefix);  }