QueryFacade implements Query { @Override public String getLanguage() { return delegate.getLanguage(); } 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 public void testGetLanguage() { Query delegate = mock(Query.class); QueryFacade<Query, Session> facade = getFacade(delegate); final String value = "value"; when(delegate.getLanguage()).thenReturn(value); assertSame("same value", value, facade.getLanguage()); }