Fix generics for Enrichers under OpenJDK 6
Add Function cast to fix EnrichersTest