testing jersey restful for stat computing + heavy refactoring