Added InfrastructureApi unit tests

Just catch the expected exception instead of doing this.