public SQLTranslatorContext translate(final String sql, final List<Object> parameters, final QueryContext queryContext,
                                          final DatabaseType storageType, final ShardingSphereDatabase database, final RuleMetaData globalRuleMetaData) {
        DatabaseType sqlParserType = queryContext.getSqlStatementContext().getDatabaseType();
        if (sqlParserType.equals(storageType) || null == storageType) {
            return new SQLTranslatorContext(sql, parameters);
        }
        try {
            return translator.translate(sql, parameters, queryContext, storageType, database, globalRuleMetaData);
        } catch (final SQLTranslationException ex) {
            if (useOriginalSQLWhenTranslatingFailed) {
                return new SQLTranslatorContext(sql, parameters);
            }
            throw ex;
        }
    }
@Test
    void assertTranslateWithProtocolDifferentWithStorage() {
        String input = "select 1";
        DatabaseType sqlParserType = TypedSPILoader.getService(DatabaseType.class, "MySQL");
        QueryContext queryContext = mock(QueryContext.class, RETURNS_DEEP_STUBS);
        when(queryContext.getSqlStatementContext().getDatabaseType()).thenReturn(sqlParserType);
        DatabaseType storageType = TypedSPILoader.getService(DatabaseType.class, "PostgreSQL");
        SQLTranslatorContext actual = new SQLTranslatorRule(new SQLTranslatorRuleConfiguration("FIXTURE", new Properties(), false)).translate(input, Collections.emptyList(),
                queryContext, storageType, mock(ShardingSphereDatabase.class), mock(RuleMetaData.class));
        assertThat(actual.getSql(), is(input.toUpperCase(Locale.ROOT)));
    }