test_class.declarator: credentialsSupport = SimpleCredentialsSupport.getInstance()
test_class.modifier: private final
test_class.original_string: private final CredentialsSupport credentialsSupport = SimpleCredentialsSupport.getInstance();
test_class.type: CredentialsSupport
test_class.var_name: credentialsSupport
test_class.file: oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupportTest.java
test_class.identifier: SimpleCredentialsSupportTest
test_case.body: @Test
      public void testGetAttributes() {
          Map<String, ?> attributes = credentialsSupport.getAttributes(new TestCredentials());
          assertNotNull(attributes);
          assertTrue(attributes.isEmpty());
  
          SimpleCredentials sc = new SimpleCredentials("uid", new char[0]);
          attributes = credentialsSupport.getAttributes(sc);
          assertNotNull(attributes);
          assertTrue(attributes.isEmpty());
  
          Map<String, ?> expected = ImmutableMap.of("a", "a", "b", Boolean.TRUE, "c", new TestCredentials());
          for (Map.Entry<String, ?> entry : expected.entrySet()) {
              sc.setAttribute(entry.getKey(), entry.getValue());
          }
  
          attributes = credentialsSupport.getAttributes(sc);
          assertNotNull(attributes);
          assertEquals(3, attributes.size());
          assertEquals(expected, attributes);
      }
test_case.class_method_signature: SimpleCredentialsSupportTest.testGetAttributes()
test_case.full_signature: @Test public void testGetAttributes()
test_case.identifier: testGetAttributes
test_case.invocations: getAttributes assertNotNull assertTrue isEmpty getAttributes assertNotNull assertTrue isEmpty of entrySet setAttribute getKey getValue getAttributes assertNotNull assertEquals size assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetAttributes()
focal_class.declarator: INSTANCE = new SimpleCredentialsSupport()
focal_class.modifier: private static final
focal_class.original_string: private static final SimpleCredentialsSupport INSTANCE = new SimpleCredentialsSupport();
focal_class.type: SimpleCredentialsSupport
focal_class.var_name: INSTANCE
focal_class.file: oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/credentials/SimpleCredentialsSupport.java
focal_class.identifier: SimpleCredentialsSupport
focal_class.interfaces: implements CredentialsSupport
focal_class.class_method_signature: SimpleCredentialsSupport.SimpleCredentialsSupport()
focal_class.full_signature: private  SimpleCredentialsSupport()
focal_class.identifier: SimpleCredentialsSupport
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SimpleCredentialsSupport()
focal_class.class_method_signature: SimpleCredentialsSupport.getInstance()
focal_class.full_signature: public static CredentialsSupport getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: CredentialsSupport
focal_class.signature: CredentialsSupport getInstance()
focal_class.class_method_signature: SimpleCredentialsSupport.getCredentialClasses()
focal_class.full_signature: @Override @NotNull public Set<Class> getCredentialClasses()
focal_class.identifier: getCredentialClasses
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: ()
focal_class.return: Set<Class>
focal_class.signature: Set<Class> getCredentialClasses()
focal_class.class_method_signature: SimpleCredentialsSupport.getUserId(@NotNull Credentials credentials)
focal_class.full_signature: @Override @Nullable public String getUserId(@NotNull Credentials credentials)
focal_class.identifier: getUserId
focal_class.modifiers: @Override @Nullable public
focal_class.parameters: (@NotNull Credentials credentials)
focal_class.return: String
focal_class.signature: String getUserId(@NotNull Credentials credentials)
focal_class.class_method_signature: SimpleCredentialsSupport.getAttributes(@NotNull Credentials credentials)
focal_class.full_signature: @Override @NotNull public Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_class.identifier: getAttributes
focal_class.modifiers: @Override @NotNull public
focal_class.parameters: (@NotNull Credentials credentials)
focal_class.return: Map<String, ?>
focal_class.signature: Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_class.class_method_signature: SimpleCredentialsSupport.setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.full_signature: @Override public boolean setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.identifier: setAttributes
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_class.return: boolean
focal_class.signature: boolean setAttributes(@NotNull Credentials credentials, @NotNull Map<String, ?> attributes)
focal_method.body: @Override
      @NotNull
      public Map<String, ?> getAttributes(@NotNull Credentials credentials) {
          if (credentials instanceof SimpleCredentials) {
              final SimpleCredentials sc = (SimpleCredentials) credentials;
              return Maps.asMap(ImmutableSet.copyOf(sc.getAttributeNames()), new Function<String, Object>() {
                  @Nullable
                  @Override
                  public Object apply(String input) {
                      return sc.getAttribute(input);
                  }
              });
          } else {
              return Collections.emptyMap();
          }
      }
focal_method.class_method_signature: SimpleCredentialsSupport.getAttributes(@NotNull Credentials credentials)
focal_method.full_signature: @Override @NotNull public Map<String, ?> getAttributes(@NotNull Credentials credentials)
focal_method.identifier: getAttributes
focal_method.invocations: asMap copyOf getAttributeNames getAttribute emptyMap
focal_method.modifiers: @Override @NotNull public
focal_method.parameters: (@NotNull Credentials credentials)
focal_method.return: Map<String, ?>
focal_method.signature: Map<String, ?> getAttributes(@NotNull Credentials credentials)