Fix tests so they do not rely on throwing assertions.