RepositoryFacade implements Repository { @Override public Session login(Credentials credentials, String workspaceName) throws LoginException { throw new LoginException("Login not allowed through facade."); } @SuppressWarnings("WeakerAccess")  RepositoryFacade(final @Nullable Repository delegate); @Override String[] getDescriptorKeys(); @Override boolean isStandardDescriptor(String key); @Override boolean isSingleValueDescriptor(String key); @Override Value getDescriptorValue(String key); @Override Value[] getDescriptorValues(String key); @Override String getDescriptor(String key); @Override Session login(Credentials credentials, String workspaceName); @Override Session login(Credentials credentials); @Override Session login(String workspaceName); @Override Session login();  }
@Test(expected = LoginException.class) public void testNoLogin() throws Exception { RepositoryFacade facade = getFacade(mock(Repository.class)); facade.login(); }
@Test(expected = LoginException.class) public void testNoLoginWorkspace() throws Exception { RepositoryFacade facade = getFacade(mock(Repository.class)); facade.login(""); }
@Test(expected = LoginException.class) public void testNoLoginCredentials() throws Exception { RepositoryFacade facade = getFacade(mock(Repository.class)); facade.login((Credentials) null); }
@Test(expected = LoginException.class) public void testNoLoginCredentialsWorkspace() throws Exception { RepositoryFacade facade = getFacade(mock(Repository.class)); facade.login((Credentials) null, ""); }