Make ApiQueryMessageGroupTest tests passing with MW master

Change-Id: Id79af755bd205f1148b7f405c0464ea7a6dc5d72
Merge "Make ApiQueryMessageGroupTest tests passing with MW master"