Infrastructure tests

This is not being properly tested. If the method doesn't throw the exception the test will succeed too.