Store as binary test

Hi Sanne,

This is the test we discussed (only the last commit is relevant, all the others are on master already).

As is, the test fails as the object returned from the cache is null. The test passes when not using the `storeAsBinary` element in the XML descriptor. It also passes when using the programmatically configured cache (commented out) instead, although it may be that I just failed to enable the binary storage mode with that approach.

As a bonus question, I'm wondering why a `ClassCastException` is raised when using `String` as key type (by uncommenting the last commented lines).

Many thanks for your help!