@Override
    public Optional<EncryptionInformation> getWriteEncryptionInformation(ConnectorSession session, TableEncryptionProperties tableEncryptionProperties, String dbName, String tableName)
    {
        if (!(tableEncryptionProperties instanceof DwrfTableEncryptionProperties)) {
            return Optional.empty();
        }
        return Optional.of(getWriteEncryptionInformationInternal(session, (DwrfTableEncryptionProperties) tableEncryptionProperties, dbName, tableName));
    }
@Test
    public void testGetWriteEncryptionInformation()
    {
        Optional<EncryptionInformation> encryptionInformation = encryptionInformationSource.getWriteEncryptionInformation(SESSION, forTable("table_level", "algo", "provider"), "dbName", "tableName");
        assertTrue(encryptionInformation.isPresent());
        assertEquals(
                encryptionInformation.get(),
                EncryptionInformation.fromEncryptionMetadata(DwrfEncryptionMetadata.forTable("table_level".getBytes(), ImmutableMap.of(TEST_EXTRA_METADATA, "algo"), "algo", "provider")));
    }