diff --git a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/merge/dql/MaskMergedResultTest.java b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/merge/dql/MaskMergedResultTest.java index 4f180c4d73fca..12c599e4593ed 100644 --- a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/merge/dql/MaskMergedResultTest.java +++ b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/merge/dql/MaskMergedResultTest.java @@ -27,6 +27,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; import java.io.InputStream; import java.io.Reader; @@ -46,6 +48,7 @@ import static org.mockito.Mockito.RETURNS_DEEP_STUBS; @ExtendWith(MockitoExtension.class) +@MockitoSettings(strictness = Strictness.LENIENT) class MaskMergedResultTest { @Mock @@ -58,6 +61,11 @@ void assertNext() throws SQLException { @Test void assertGetValue() throws SQLException { + assertNull(new MaskMergedResult(mockMaskRule(), mockSelectStatementContext(), mergedResult).getValue(1, String.class)); + } + + @Test + void assertGetValueWithNull() throws SQLException { when(mergedResult.getValue(1, Object.class)).thenReturn("VALUE"); assertThat(new MaskMergedResult(mockMaskRule(), mockSelectStatementContext(), mergedResult).getValue(1, String.class), is("MASK_VALUE")); }