@Test public void testConstructorWithCredentials() { CredentialsProvider provider = new StaticCredentialsProvider(new Credentials(userName, userPassword)); Credentials credentials = provider.getCredentials(); assert userName.equals(credentials.getUsername()); assert userPassword.equals(credentials.getPassword()); }
@Override public Credentials getCredentials() { return credentials; }
StaticCredentialsProvider implements CredentialsProvider { @Override public Credentials getCredentials() { return credentials; } }
StaticCredentialsProvider implements CredentialsProvider { @Override public Credentials getCredentials() { return credentials; } StaticCredentialsProvider(String username, String password);  StaticCredentialsProvider(Credentials credentials); }
StaticCredentialsProvider implements CredentialsProvider { @Override public Credentials getCredentials() { return credentials; } StaticCredentialsProvider(String username, String password);  StaticCredentialsProvider(Credentials credentials); @Override Credentials getCredentials(); @Override CredentialsProvider refresh(); }
StaticCredentialsProvider implements CredentialsProvider { @Override public Credentials getCredentials() { return credentials; } StaticCredentialsProvider(String username, String password);  StaticCredentialsProvider(Credentials credentials); @Override Credentials getCredentials(); @Override CredentialsProvider refresh();  }