Added test for ns api http logic and input validation