QueryFacade implements Query { @Override public final Node storeAsNode(String absPath) throws RepositoryException { throw new ListenerReadOnlyException(); } QueryFacade(final @NotNull Q delegate, final @NotNull SessionFacade<S> session); @Override QueryResult execute(); @Override void setLimit(long limit); @Override void setOffset(long offset); @Override String getStatement(); @Override String getLanguage(); @Override String getStoredQueryPath(); @Override void bindValue(String varName, Value value); @Override String[] getBindVariableNames(); @Override final Node storeAsNode(String absPath);  }
@Test(expected = ListenerReadOnlyException.class) public void testROStoreAsNode() throws Exception { QueryFacade<Query, Session> facade = getFacade(mock(Query.class)); facade.storeAsNode(""); }