test_class.file: shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapperTest.java
test_class.identifier: AuthenticationYamlSwapperTest
test_case.body: @Test
      public void assertSwapToObject() {
          YamlProxyUserConfiguration user1 = new YamlProxyUserConfiguration();
          user1.setPassword("pwd1");
          user1.setAuthorizedSchemas("db1");
          YamlProxyUserConfiguration user2 = new YamlProxyUserConfiguration();
          user2.setPassword("pwd2");
          user2.setAuthorizedSchemas("db2,db1");
          Map<String, YamlProxyUserConfiguration> users = new HashMap<>(2, 1);
          users.put("user1", user1);
          users.put("user2", user2);
          YamlAuthenticationConfiguration yamlConfig = new YamlAuthenticationConfiguration();
          yamlConfig.setUsers(users);
          Authentication actual = new AuthenticationYamlSwapper().swapToObject(yamlConfig);
          assertThat(actual.getUsers().size(), is(2));
          assertThat(actual.getUsers().get("user1").getAuthorizedSchemas().size(), is(1));
          assertThat(actual.getUsers().get("user2").getAuthorizedSchemas().size(), is(2));
      }
test_case.class_method_signature: AuthenticationYamlSwapperTest.assertSwapToObject()
test_case.full_signature: @Test public void assertSwapToObject()
test_case.identifier: assertSwapToObject
test_case.invocations: setPassword setAuthorizedSchemas setPassword setAuthorizedSchemas put put setUsers swapToObject assertThat size getUsers is assertThat size getAuthorizedSchemas get getUsers is assertThat size getAuthorizedSchemas get getUsers is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToObject()
focal_class.declarator: proxyUserYamlSwapper = new ProxyUserYamlSwapper()
focal_class.modifier: private final
focal_class.original_string: private final ProxyUserYamlSwapper proxyUserYamlSwapper = new ProxyUserYamlSwapper();
focal_class.type: ProxyUserYamlSwapper
focal_class.var_name: proxyUserYamlSwapper
focal_class.file: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/auth/yaml/swapper/AuthenticationYamlSwapper.java
focal_class.identifier: AuthenticationYamlSwapper
focal_class.interfaces: implements YamlSwapper<YamlAuthenticationConfiguration, Authentication>
focal_class.class_method_signature: AuthenticationYamlSwapper.swapToYamlConfiguration(final Authentication data)
focal_class.full_signature: @Override public YamlAuthenticationConfiguration swapToYamlConfiguration(final Authentication data)
focal_class.identifier: swapToYamlConfiguration
focal_class.modifiers: @Override public
focal_class.parameters: (final Authentication data)
focal_class.return: YamlAuthenticationConfiguration
focal_class.signature: YamlAuthenticationConfiguration swapToYamlConfiguration(final Authentication data)
focal_class.class_method_signature: AuthenticationYamlSwapper.swapToObject(final YamlAuthenticationConfiguration yamlConfig)
focal_class.full_signature: @Override public Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig)
focal_class.identifier: swapToObject
focal_class.modifiers: @Override public
focal_class.parameters: (final YamlAuthenticationConfiguration yamlConfig)
focal_class.return: Authentication
focal_class.signature: Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig)
focal_method.body: @Override
      public Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig) {
          Authentication result = new Authentication();
          if (null == yamlConfig) {
              return result;
          }
          result.getUsers().putAll(Maps.transformValues(yamlConfig.getUsers(), proxyUserYamlSwapper::swapToObject));
          return result;
      }
focal_method.class_method_signature: AuthenticationYamlSwapper.swapToObject(final YamlAuthenticationConfiguration yamlConfig)
focal_method.full_signature: @Override public Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig)
focal_method.identifier: swapToObject
focal_method.invocations: putAll getUsers transformValues getUsers
focal_method.modifiers: @Override public
focal_method.parameters: (final YamlAuthenticationConfiguration yamlConfig)
focal_method.return: Authentication
focal_method.signature: Authentication swapToObject(final YamlAuthenticationConfiguration yamlConfig)