@Test
public void testGetSegmentsEntryIdsWithUncachedUserSegments() {

	long groupId = RandomTestUtil.randomLong();
	Mockito.when(
		_groupLocalService.fetchGroup(groupId)
	).thenReturn(
		Mockito.mock(Group.class)
	);
	String userId = RandomTestUtil.randomString();
	Mockito.when(
		_asahSegmentsEntryCache.getSegmentsEntryIds(userId)
	).thenReturn(
		null
	);
	Context context = new Context();
	context.put(
		SegmentsAsahRequestContextContributor.
			KEY_SEGMENTS_ANONYMOUS_USER_ID,
		userId);
	Assert.assertArrayEquals(
		new long[0],
		_asahSegmentsEntryProvider.getSegmentsEntryIds(
			groupId, RandomTestUtil.randomString(),
			RandomTestUtil.randomLong(), context));
	Mockito.verify(
		_messageBus, Mockito.times(1)
	).sendMessage(
		Mockito.anyString(), Mockito.any(Message.class)
	);
}