Throw an exception while Public IP not found and Add some test cases for CPI