special handling of Serializable target type produced by Mockito - use
getObject().getClass() as fallback