made invoke(Invocation) throw Error for impossible situation
tested that missing when() exception contains useful message