[server][testHostResourceQueryOptionSubClasses] Extract inner methods so that other other methods can use them.