refactor servlet test