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: encryptRule
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EncryptRule encryptRule;
test_class.type: EncryptRule
test_class.var_name: encryptRule
test_class.declarator: selectStatementContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private SelectStatementContext selectStatementContext;
test_class.type: SelectStatementContext
test_class.var_name: selectStatementContext
test_class.declarator: tablesContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private TablesContext tablesContext;
test_class.type: TablesContext
test_class.var_name: tablesContext
test_class.declarator: columnProjection
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ColumnProjection columnProjection;
test_class.type: ColumnProjection
test_class.var_name: columnProjection
test_class.declarator: projectionsContext
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProjectionsContext projectionsContext;
test_class.type: ProjectionsContext
test_class.var_name: projectionsContext
test_class.declarator: encryptAlgorithm
test_class.modifier: private
test_class.original_string: private EncryptAlgorithm encryptAlgorithm;
test_class.type: EncryptAlgorithm
test_class.var_name: encryptAlgorithm
test_class.file: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-merge/src/test/java/org/apache/shardingsphere/encrypt/merge/dql/EncryptAlgorithmMetaDataTest.java
test_class.identifier: EncryptAlgorithmMetaDataTest
test_case.body: @Test
      public void assertFindEncryptorByColumnName() {
          when(tablesContext.findTableName(columnProjection, schemaMetaData)).thenReturn(Optional.empty());
          when(tablesContext.getTableNames()).thenReturn(Arrays.asList("t_user", "t_user_item", "t_order_item"));
          when(encryptRule.findEncryptor("t_order_item", "id")).thenReturn(Optional.of(encryptAlgorithm));
          EncryptAlgorithmMetaData encryptAlgorithmMetaData = new EncryptAlgorithmMetaData(schemaMetaData, encryptRule, selectStatementContext);
          Optional<EncryptAlgorithm> actualEncryptor = encryptAlgorithmMetaData.findEncryptor(1);
          assertTrue(actualEncryptor.isPresent());
          assertThat(actualEncryptor.get().getType(), is("MD5"));
      }
test_case.class_method_signature: EncryptAlgorithmMetaDataTest.assertFindEncryptorByColumnName()
test_case.full_signature: @Test public void assertFindEncryptorByColumnName()
test_case.identifier: assertFindEncryptorByColumnName
test_case.invocations: thenReturn when findTableName empty thenReturn when getTableNames asList thenReturn when findEncryptor of findEncryptor assertTrue isPresent assertThat getType get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertFindEncryptorByColumnName()
focal_class.declarator: schemaMetaData
focal_class.modifier: private final
focal_class.original_string: private final SchemaMetaData schemaMetaData;
focal_class.type: SchemaMetaData
focal_class.var_name: schemaMetaData
focal_class.declarator: encryptRule
focal_class.modifier: private final
focal_class.original_string: private final EncryptRule encryptRule;
focal_class.type: EncryptRule
focal_class.var_name: encryptRule
focal_class.declarator: selectStatementContext
focal_class.modifier: private final
focal_class.original_string: private final SelectStatementContext selectStatementContext;
focal_class.type: SelectStatementContext
focal_class.var_name: selectStatementContext
focal_class.file: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-merge/src/main/java/org/apache/shardingsphere/encrypt/merge/dql/EncryptAlgorithmMetaData.java
focal_class.identifier: EncryptAlgorithmMetaData
focal_class.class_method_signature: EncryptAlgorithmMetaData.findEncryptor(final int columnIndex)
focal_class.full_signature: public Optional<EncryptAlgorithm> findEncryptor(final int columnIndex)
focal_class.identifier: findEncryptor
focal_class.modifiers: public
focal_class.parameters: (final int columnIndex)
focal_class.return: Optional<EncryptAlgorithm>
focal_class.signature: Optional<EncryptAlgorithm> findEncryptor(final int columnIndex)
focal_class.class_method_signature: EncryptAlgorithmMetaData.findEncryptor(final int columnIndex, final List<Projection> expandProjections)
focal_class.full_signature: private Optional<EncryptAlgorithm> findEncryptor(final int columnIndex, final List<Projection> expandProjections)
focal_class.identifier: findEncryptor
focal_class.modifiers: private
focal_class.parameters: (final int columnIndex, final List<Projection> expandProjections)
focal_class.return: Optional<EncryptAlgorithm>
focal_class.signature: Optional<EncryptAlgorithm> findEncryptor(final int columnIndex, final List<Projection> expandProjections)
focal_class.class_method_signature: EncryptAlgorithmMetaData.findEncryptor(final String tableName, final String columnName)
focal_class.full_signature: private Optional<EncryptAlgorithm> findEncryptor(final String tableName, final String columnName)
focal_class.identifier: findEncryptor
focal_class.modifiers: private
focal_class.parameters: (final String tableName, final String columnName)
focal_class.return: Optional<EncryptAlgorithm>
focal_class.signature: Optional<EncryptAlgorithm> findEncryptor(final String tableName, final String columnName)
focal_class.class_method_signature: EncryptAlgorithmMetaData.findEncryptor(final String columnName)
focal_class.full_signature: private Optional<EncryptAlgorithm> findEncryptor(final String columnName)
focal_class.identifier: findEncryptor
focal_class.modifiers: private
focal_class.parameters: (final String columnName)
focal_class.return: Optional<EncryptAlgorithm>
focal_class.signature: Optional<EncryptAlgorithm> findEncryptor(final String columnName)
focal_method.body: public Optional<EncryptAlgorithm> findEncryptor(final int columnIndex) {
          List<Projection> expandProjections = selectStatementContext.getProjectionsContext().getExpandProjections();
          if (expandProjections.isEmpty()) {
              return Optional.empty();
          }
          return findEncryptor(columnIndex, expandProjections);
      }
focal_method.class_method_signature: EncryptAlgorithmMetaData.findEncryptor(final int columnIndex)
focal_method.full_signature: public Optional<EncryptAlgorithm> findEncryptor(final int columnIndex)
focal_method.identifier: findEncryptor
focal_method.invocations: getExpandProjections getProjectionsContext isEmpty empty findEncryptor
focal_method.modifiers: public
focal_method.parameters: (final int columnIndex)
focal_method.return: Optional<EncryptAlgorithm>
focal_method.signature: Optional<EncryptAlgorithm> findEncryptor(final int columnIndex)