@Test
public void testGetPagesByPageQuery() {

	try {
		PageQuery query = new PageQuery();
		// expected: ONE match
		query.setTitlePattern(A_FAMOUS_PAGE+"%");
		Iterable<Page> iterable = wiki.getPages(query);
		assertNotNull(iterable);
		Page page = iterable.iterator().next();
		assertEquals(A_FAMOUS_PAGE_ID, page.getPageId());
		// expected: ONE match
		query.setOnlyArticlePages(true);
		iterable = wiki.getPages(query);
		assertNotNull(iterable);
		page = iterable.iterator().next();
		assertEquals(A_FAMOUS_PAGE_ID, page.getPageId());
		// expected: NO match
		query.setOnlyArticlePages(false);
		query.setOnlyDisambiguationPages(true);
		iterable = wiki.getPages(query);
		assertNotNull(iterable);
		assertFalse(iterable.iterator().hasNext());
		// expected: NO match
		query.setTitlePattern(A_FAMOUS_PAGE+"_");
		iterable = wiki.getPages(query);
		assertNotNull(iterable);
		assertFalse(iterable.iterator().hasNext());
	} catch (WikiApiException e) {
		fail("Encountered WikiApiException: " + e.getLocalizedMessage());
	}
}