Added more unittest. Changes according to REST spec.