@Test
public void testGetQueryPropertyNames() throws Throwable {

    ServiceDocumentDescription desc = Builder.create().buildDescription(
            ExampleServiceState.class);
    Set<String> queryPropertyNames = QueryTaskUtils.getExpandedQueryPropertyNames(desc);
    Set<String> expectedPropertyNames = new HashSet<>();
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_COUNTER);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_SORTED_COUNTER);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_NAME);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_ID);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_REQUIRED);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_KEY_VALUES);
    expectedPropertyNames.add(ExampleServiceState.FIELD_NAME_IS_FROM_MIGRATION);
    expectedPropertyNames.add("tags.item");
    assertEquals(expectedPropertyNames, queryPropertyNames);
}