@Test
    public void testCallableStatement() throws Exception {
        super.executeCallableStatement();

        PluginTestVerifier verifier = PluginTestVerifierHolder.getInstance();
//        verifier.printCache();
        verifier.printMethod();
        final int traceCount = verifier.getTraceCount();
        if (!(traceCount == 6 || traceCount == 5)) {
            Assertions.fail("traceCount=" + traceCount);
        }

        // Driver#connect(String, Properties)
        Method connect = jdbcApi.getDriver().getConnect();
        verifier.verifyTrace(event(DB_TYPE, connect, null, URL, DATABASE_NAME, cachedArgs(getJdbcUrl())));

        // MariaDbConnection#prepareCall(String)
        Method prepareCall = jdbcApi.getConnection().getPrepareCall();
        verifier.verifyTrace(event(DB_TYPE, prepareCall, null, URL, DATABASE_NAME, sql(CALLABLE_STATEMENT_QUERY, null)));

        // CallableProcedureStatement#registerOutParameter
        final JDBCApi.CallableStatementClass callableStatement = jdbcApi.getCallableStatement();
        Method registerOutParameter = callableStatement.getRegisterOutParameter();
        verifier.verifyTrace(event(DB_TYPE, registerOutParameter, null, URL, DATABASE_NAME, args(2, CALLABLE_STATMENT_OUTPUT_PARAM_TYPE)));

        // ServerSidePreparedStatement#executeQuery
        Method executeQuery = jdbcApi.getPreparedStatement().getExecuteQuery();
        verifier.verifyTrace(event(DB_EXECUTE_QUERY, executeQuery, null, URL, DATABASE_NAME, sql(CALLABLE_STATEMENT_QUERY, null, CALLABLE_STATEMENT_INPUT_PARAM)));

        // TODO Unnecessary metadata query are traced in getInt()
        if (traceCount == 6) {
            // getInt() -> metadata query
            // mariadb 2.4.0 ~ 2.7.2
            // MariaDbConnection#prepareStatement(String)
            Method prepareStatement = jdbcApi.getConnection().getPrepareStatement();
            verifier.verifyTrace(event(DB_TYPE, prepareStatement, null, URL, DATABASE_NAME, sql(CALLABLE_QUERY_META_INFOS_QUERY, null)));

            // ClientSidePreparedStatement#executeQuery
            Method executeQueryClient = clientJdbcApi.getPreparedStatement().getExecuteQuery();
            verifier.verifyTrace(event(DB_EXECUTE_QUERY, executeQueryClient, null, URL, DATABASE_NAME, sql(CALLABLE_QUERY_META_INFOS_QUERY, null, getPrepareCallBindVariable())));
        } else if (traceCount == 5) {
            // mariadb 2.7.3 ~
            // MariaDbConnection.getInternalParameterMetaData()
            // ClientSidePreparedStatement creation  is different.
            Method executeQueryMethod = getMethod("org.mariadb.jdbc.ClientSidePreparedStatement", "executeQuery");
            verifier.verifyTrace(event("UNKNOWN_DB_EXECUTE_QUERY", executeQueryMethod, null, "unknown", "unknown"));
        }
    }
<p>Notable class changes :<br/>
<ul>
    <li><tt>org.mariadb.jdbc.MariaDbPreparedStatementServer</tt> -> <tt>org.mariadb.jdbc.ServerSidePreparedStatement</tt></li>
    <li><tt>org.mariadb.jdbc.MariaDbPreparedStatementClient</tt> -> <tt>org.mariadb.jdbc.ClientSidePreparedStatement</tt></li>
</ul>
</p>

@author HyunGil Jeong
agent-module/plugins-it/mariadb-jdbc-it/src/test/java/com/navercorp/pinpoint/it/plugin/jdbc/MariaDB_2_4_x_IT.java