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 assertSwapToYaml() {
          Authentication authentication = new Authentication();
          authentication.getUsers().put("user1", new ProxyUser("pwd1", Collections.singleton("db1")));
          authentication.getUsers().put("user2", new ProxyUser("pwd2", Collections.singleton("db2")));
          YamlAuthenticationConfiguration actual = new AuthenticationYamlSwapper().swapToYamlConfiguration(authentication);
          assertThat(actual.getUsers().size(), is(2));
          assertThat(actual.getUsers().get("user1").getPassword(), is("pwd1"));
          assertThat(actual.getUsers().get("user1").getAuthorizedSchemas(), is("db1"));
          assertThat(actual.getUsers().get("user2").getPassword(), is("pwd2"));
          assertThat(actual.getUsers().get("user2").getAuthorizedSchemas(), is("db2"));
      }
test_case.class_method_signature: AuthenticationYamlSwapperTest.assertSwapToYaml()
test_case.full_signature: @Test public void assertSwapToYaml()
test_case.identifier: assertSwapToYaml
test_case.invocations: put getUsers singleton put getUsers singleton swapToYamlConfiguration assertThat size getUsers is assertThat getPassword get getUsers is assertThat getAuthorizedSchemas get getUsers is assertThat getPassword get getUsers is assertThat getAuthorizedSchemas get getUsers is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapToYaml()
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 YamlAuthenticationConfiguration swapToYamlConfiguration(final Authentication data) {
          YamlAuthenticationConfiguration result = new YamlAuthenticationConfiguration();
          result.setUsers(Maps.transformValues(data.getUsers(), proxyUserYamlSwapper::swapToYamlConfiguration));
          return result;
      }
focal_method.class_method_signature: AuthenticationYamlSwapper.swapToYamlConfiguration(final Authentication data)
focal_method.full_signature: @Override public YamlAuthenticationConfiguration swapToYamlConfiguration(final Authentication data)
focal_method.identifier: swapToYamlConfiguration
focal_method.invocations: setUsers transformValues getUsers
focal_method.modifiers: @Override public
focal_method.parameters: (final Authentication data)
focal_method.return: YamlAuthenticationConfiguration
focal_method.signature: YamlAuthenticationConfiguration swapToYamlConfiguration(final Authentication data)