Changed test  to use Assert.DoesNotThrow instead of try-catch