Fix unit test compilation errror with the eclipse compiler using Java 7.

The eclipse compiler refuses to compile

    Assertions.assertInstanceOf(violation.getConstraintDescriptor().getAnnotation(), MinDuration.class);

with

    Bound mismatch: The generic method assertInstanceOf(T, Class<U>) of type Assertions is not applicable for the arguments (capture#2-of ?, Class<MinDuration>). The inferred type MinDuration is not a valid substitute for the bounded parameter <U extends T>.

The additional cast fixes this compile problem. The problem does not exist when Eclipse is set to Java 8 compilance.