diff --git a/src/test/java/net/snowflake/client/jdbc/structuredtypes/StructuredTypesGetStringBaseIT.java b/src/test/java/net/snowflake/client/jdbc/structuredtypes/StructuredTypesGetStringBaseIT.java index ccd6fdb31..9d7f972a6 100644 --- a/src/test/java/net/snowflake/client/jdbc/structuredtypes/StructuredTypesGetStringBaseIT.java +++ b/src/test/java/net/snowflake/client/jdbc/structuredtypes/StructuredTypesGetStringBaseIT.java @@ -2,7 +2,7 @@ import static org.junit.Assert.assertTrue; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; @@ -67,8 +67,10 @@ protected void assertGetObjectIsCompatible(ResultSet resultSet, String expected) protected void assertGetBytesIsCompatible(ResultSet resultSet, String expected) throws SQLException { + byte[] expectedBytes = expected.getBytes(); TestUtil.assertEqualsIgnoringWhitespace( - expected, new String(resultSet.getBytes(1), Charset.defaultCharset())); + new String(expectedBytes, StandardCharsets.UTF_8), + new String(resultSet.getBytes(1), StandardCharsets.UTF_8)); } protected void withFirstRow(