EncryptTable { public Optional<String> findEncryptorName(final String logicColumn) { return columns.containsKey(logicColumn) ? Optional.of(columns.get(logicColumn).getEncryptorName()) : Optional.empty(); } EncryptTable(final EncryptTableRuleConfiguration config); Optional<String> findEncryptorName(final String logicColumn); Collection<String> getLogicColumns(); String getLogicColumn(final String cipherColumn); boolean isCipherColumn(final String columnName); String getCipherColumn(final String logicColumn); Collection<String> getAssistedQueryColumns(); Optional<String> findAssistedQueryColumn(final String logicColumn); Collection<String> getPlainColumns(); Optional<String> findPlainColumn(final String logicColumn); Map<String, String> getLogicAndCipherColumns();  }
@Test public void assertFindEncryptorName() { assertTrue(encryptTable.findEncryptorName("logicColumn").isPresent()); }
@Test public void assertNotFindEncryptorName() { assertFalse(encryptTable.findEncryptorName("notExistLogicColumn").isPresent()); }