test_class.declarator: rule
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EncryptRule rule;
test_class.type: EncryptRule
test_class.var_name: rule
test_class.declarator: databaseType
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DatabaseType databaseType;
test_class.type: DatabaseType
test_class.var_name: databaseType
test_class.declarator: schemaMetaData
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SchemaMetaData schemaMetaData;
test_class.type: SchemaMetaData
test_class.var_name: schemaMetaData
test_class.declarator: props
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationProperties props;
test_class.type: ConfigurationProperties
test_class.var_name: props
test_class.file: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-merge/src/test/java/org/apache/shardingsphere/encrypt/merge/EncryptResultDecoratorEngineTest.java
test_class.identifier: EncryptResultDecoratorEngineTest
test_case.body: @Test
      public void assertNewInstanceWithDALStatement() {
          SQLStatementContext<MySQLDescribeStatement> sqlStatementContext = mock(DescribeStatementContext.class);
          when(sqlStatementContext.getSqlStatement()).thenReturn(mock(MySQLDescribeStatement.class));
          EncryptResultDecoratorEngine engine = (EncryptResultDecoratorEngine) OrderedSPIRegistry.getRegisteredServices(Collections.singleton(rule), ResultProcessEngine.class).get(rule);
          ResultDecorator actual = engine.newInstance(databaseType, schemaMetaData, rule, props, sqlStatementContext);
          assertThat(actual, instanceOf(EncryptDALResultDecorator.class));
      }
test_case.class_method_signature: EncryptResultDecoratorEngineTest.assertNewInstanceWithDALStatement()
test_case.full_signature: @Test public void assertNewInstanceWithDALStatement()
test_case.identifier: assertNewInstanceWithDALStatement
test_case.invocations: mock thenReturn when getSqlStatement mock get getRegisteredServices singleton newInstance assertThat instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertNewInstanceWithDALStatement()
focal_class.file: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-merge/src/main/java/org/apache/shardingsphere/encrypt/merge/EncryptResultDecoratorEngine.java
focal_class.identifier: EncryptResultDecoratorEngine
focal_class.interfaces: implements ResultDecoratorEngine<EncryptRule>
focal_class.class_method_signature: EncryptResultDecoratorEngine.newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_class.full_signature: @Override public ResultDecorator newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_class.identifier: newInstance
focal_class.modifiers: @Override public
focal_class.parameters: (final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_class.return: ResultDecorator
focal_class.signature: ResultDecorator newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_class.class_method_signature: EncryptResultDecoratorEngine.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_class.class_method_signature: EncryptResultDecoratorEngine.getTypeClass()
focal_class.full_signature: @Override public Class<EncryptRule> getTypeClass()
focal_class.identifier: getTypeClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<EncryptRule>
focal_class.signature: Class<EncryptRule> getTypeClass()
focal_method.body: @Override
      public ResultDecorator newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext) {
          if (sqlStatementContext instanceof SelectStatementContext) {
              return new EncryptDQLResultDecorator(new EncryptAlgorithmMetaData(schemaMetaData, 
                      encryptRule, (SelectStatementContext) sqlStatementContext), props.<Boolean>getValue(ConfigurationPropertyKey.QUERY_WITH_CIPHER_COLUMN));
          } 
          if (sqlStatementContext.getSqlStatement() instanceof DALStatement) {
              return new EncryptDALResultDecorator();
          }
          return new TransparentResultDecorator();
      }
focal_method.class_method_signature: EncryptResultDecoratorEngine.newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_method.full_signature: @Override public ResultDecorator newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_method.identifier: newInstance
focal_method.invocations: getValue getSqlStatement
focal_method.modifiers: @Override public
focal_method.parameters: (final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)
focal_method.return: ResultDecorator
focal_method.signature: ResultDecorator newInstance(final DatabaseType databaseType, final SchemaMetaData schemaMetaData,
                                         final EncryptRule encryptRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext)