Add tests for IP functions