diff --git a/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java b/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java index 0d835215a804a9f5ffd8d2dfa77cc11c5e85f545..c203aa9353fae1b30f6146f4bdcebf3d58e35f25 100644 --- a/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java +++ b/sharding-core/src/test/java/io/shardingsphere/core/yaml/sharding/YamlKeyGeneratorConfigurationTest.java @@ -19,6 +19,7 @@ package io.shardingsphere.core.yaml.sharding; import io.shardingsphere.core.exception.ShardingConfigurationException; import io.shardingsphere.core.keygen.SnowflakeKeyGenerator; +import io.shardingsphere.core.keygen.UUIDKeyGenerator; import org.junit.Test; import static org.hamcrest.Matchers.is; @@ -53,11 +54,11 @@ public class YamlKeyGeneratorConfigurationTest { keyGeneratorConfiguration.getKeyGenerator(); } - @Test(expected = IllegalArgumentException.class) + @Test public void assertGetKeyGeneratorClassNameWithUUID() { YamlKeyGeneratorConfiguration keyGeneratorConfiguration = new YamlKeyGeneratorConfiguration(); keyGeneratorConfiguration.setType("UUID"); - keyGeneratorConfiguration.getKeyGenerator(); + assertThat(keyGeneratorConfiguration.getKeyGenerator().getClass().getName(), is(UUIDKeyGenerator.class.getName())); } @Test(expected = ShardingConfigurationException.class)