@Test
public void testGetSegmentsEntryIdsWithCachedUserSegments() {

	String userId = RandomTestUtil.randomString();
	long[] segmentsEntryIds = {
		RandomTestUtil.randomLong(), RandomTestUtil.randomLong()
	};
	Mockito.when(
		_asahSegmentsEntryCache.getSegmentsEntryIds(userId)
	).thenReturn(
		segmentsEntryIds
	);
	Context context = new Context();
	context.put(
		SegmentsAsahRequestContextContributor.
			KEY_SEGMENTS_ANONYMOUS_USER_ID,
		userId);
	Assert.assertArrayEquals(
		segmentsEntryIds,
		_asahSegmentsEntryProvider.getSegmentsEntryIds(
			RandomTestUtil.randomLong(), RandomTestUtil.randomString(),
			RandomTestUtil.randomLong(), context));
	Mockito.verify(
		_messageBus, Mockito.never()
	).sendMessage(
		Mockito.anyString(), Mockito.any(Message.class)
	);
}