### Question:
EncryptionContextOperators { public static UnaryOperator<EncryptionContext> overrideEncryptionContextTableNameUsingMap( Map<String, String> tableNameOverrideMap) { return encryptionContext -> { if (tableNameOverrideMap == null || encryptionContext == null || encryptionContext.getTableName() == null) { return encryptionContext; } String newTableName = tableNameOverrideMap.get(encryptionContext.getTableName()); if (newTableName != null) { return new EncryptionContext.Builder(encryptionContext).withTableName(newTableName).build(); } else { return encryptionContext; } }; } private  EncryptionContextOperators(); static UnaryOperator<EncryptionContext> overrideEncryptionContextTableName(
            String originalTableName,
            String newTableName); static UnaryOperator<EncryptionContext> overrideEncryptionContextTableNameUsingMap(
            Map<String, String> tableNameOverrideMap);  }### Answer:
@Test public void testCreateEncryptionContextTableNameOverrideMap_multipleOverrides() { Map<String, String> tableNameOverrides = new HashMap<>(); tableNameOverrides.put("OriginalTableName1", "MyNewTableName1"); tableNameOverrides.put("OriginalTableName2", "MyNewTableName2"); Function<EncryptionContext, EncryptionContext> overrideOperator = overrideEncryptionContextTableNameUsingMap(tableNameOverrides); EncryptionContext context = new EncryptionContext.Builder().withTableName("OriginalTableName1").build(); EncryptionContext newContext = overrideOperator.apply(context); assertEquals("OriginalTableName1", context.getTableName()); assertEquals("MyNewTableName1", newContext.getTableName()); EncryptionContext context2 = new EncryptionContext.Builder().withTableName("OriginalTableName2").build(); EncryptionContext newContext2 = overrideOperator.apply(context2); assertEquals("OriginalTableName2", context2.getTableName()); assertEquals("MyNewTableName2", newContext2.getTableName()); }
@Test public void testCreateEncryptionContextTableNameOverrideMap_expectedOverride() { Map<String, String> tableNameOverrides = new HashMap<>(); tableNameOverrides.put("OriginalTableName", "MyNewTableName"); Function<EncryptionContext, EncryptionContext> nameOverrideMap = overrideEncryptionContextTableNameUsingMap(tableNameOverrides); EncryptionContext context = new EncryptionContext.Builder().withTableName("OriginalTableName").build(); EncryptionContext newContext = nameOverrideMap.apply(context); assertEquals("OriginalTableName", context.getTableName()); assertEquals("MyNewTableName", newContext.getTableName()); }