@Test
public void testWildcardExpansionWithinLimit() {

	CacheService cacheServiceMock = mock(CacheService.class);
	when(cacheServiceMock.get(anyString())).thenReturn(CACHED_QUERIES);
	DiscoveryService discoveryServiceMock = mock(DiscoveryService.class);
	CachedDiscoveryService service = new CachedDiscoveryService(cacheServiceMock, discoveryServiceMock, system.getConfiguration(), null);
	List<MetricQuery> queries = service.getMatchingQueries(new MetricQuery("scope*", "metric", null, System.currentTimeMillis() - (30 * 24 * 60 * 60 * 1000L), System.currentTimeMillis()));
	assertEquals(30, queries.size());
}