Added InfrastructureApi unit tests

What happens if the resource you are looking for does not exist? Add a test for that case.