Testing architectural or infrastructural things like "instanceof" makes tests brittle and has effectively no value. Please remove this assertion.