Updated "when"-stubbing with "thenThrow".