added rest test and returning json