diff --git a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/rule/MaskRuleTest.java b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/rule/MaskRuleTest.java index 0273c6cac8265..08b95f43b7f28 100644 --- a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/rule/MaskRuleTest.java +++ b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/rule/MaskRuleTest.java @@ -27,8 +27,11 @@ import java.util.Collections; import java.util.Properties; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; class MaskRuleTest { @@ -55,4 +58,11 @@ void assertFindMaskTableWhenTableNameExists() { void assertFindMaskTableWhenTableNameDoesNotExist() { assertFalse(maskRule.findMaskTable("non_existent_table").isPresent()); } + + @Test + void assertUpdateConfiguration() { + MaskRuleConfiguration toBeUpdatedRuleConfig = mock(MaskRuleConfiguration.class); + maskRule.updateConfiguration(toBeUpdatedRuleConfig); + assertThat(maskRule.getConfiguration(), is(toBeUpdatedRuleConfig)); + } }