fix assertions in server test and handler test