EncryptTable { public Optional<String> findAssistedQueryColumn(final String logicColumn) { return columns.containsKey(logicColumn) ? columns.get(logicColumn).getAssistedQueryColumn() : 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 assertFindAssistedQueryColumn() { Optional<String> actual = encryptTable.findAssistedQueryColumn("logicColumn"); assertTrue(actual.isPresent()); assertThat(actual.get(), is("assistedQueryColumn")); }
@Test public void assertNotFindAssistedQueryColumn() { assertFalse(encryptTable.findAssistedQueryColumn("notExistLogicColumn").isPresent()); }