@@ -0,0 +1,1311 @@
+package org.mariadb.jdbc;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.sql.PreparedStatement;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0A%0Aimport org.junit.Test;%0A%0Apublic class CollationTest extends BaseTest %7B%0A%09%0A%09@Test%0A%09public void emoji() throws SQLException %7B%0A%09%09Connection conn = DriverManager.getConnection(%22jdbc:mysql://localhost:3306/test?user=root&useUnicode=yes&useConfigs=maxPerformance%22);%0A%09%09conn.createStatement().execute(%22SET @@character_set_server = 'utf8mb4'%22);%0A%09%09conn.createStatement().execute(%22SET NAMES utf8mb4%22);%0A%09%09conn.createStatement().execute(%22DROP TABLE IF EXISTS emojiTest%22);%0A%09%09conn.createStatement().execute(%22CREATE TABLE emojiTest (id int unsigned, field longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci)%22);%0A%09%09PreparedStatement ps = conn.prepareStatement(%22INSERT INTO emojiTest (id, field) VALUES (1, ?)%22);%0A%09%09byte%5B%5D emoji = new byte%5B%5D %7B(byte)0xF0, (byte)0x9F, (byte)0x98, (byte)0x84%7D;%0A%09%09ps.setBytes(1, emoji);%0A%09%09ps.execute();%0A%09%09ps = conn.prepareStatement(%22SELECT field FROM emojiTest%22);%0A%09%09ResultSet rs = ps.executeQuery();%0A%09%09assertTrue(rs.next());%0A%09%09// compare to the Java representation of UTF32%0A%09%09assertEquals(%22%5CuD83D%5CuDE04%22, rs.getString(1));%0A%09%7D%0A%7D%0A

Test case for CONJ-92