code: public static SanePasswordProvider forUsernameAndPassword(
        final String username, final String password) {
      return new SanePasswordProvider() {
        @Override
        public String getUsername(String resource) {
          return username;
        }
  
        @Override
        public String getPassword(String resource) {
          return password;
        }
  
        @Override
        public boolean canAuthenticate(String resource) {
          return true;
        }
      };
    }
docs: Returns a {@code SanePasswordProvider} that returns the given username and password.