@Test
public void testGetSizeWhenWorkflowTaskAssigneesIsNotLoaded() {

	long kaleoTaskInstanceTokenId = RandomTestUtil.randomLong();
	KaleoTaskInstanceToken kaleoTaskInstanceToken =
		new KaleoTaskInstanceTokenWrapper(
			KaleoRuntimeTestUtil.mockKaleoTaskInstanceToken()) {
			@Override
			public long getKaleoTaskInstanceTokenId() {
				return kaleoTaskInstanceTokenId;
			}
		};
	int kaleoTaskAssignmentInstancesCount = RandomTestUtil.randomInt();
	KaleoTaskAssignmentInstanceLocalService
		kaleoTaskAssignmentInstanceLocalService =
			new KaleoTaskAssignmentInstanceLocalServiceWrapper(null) {
				@Override
				public int getKaleoTaskAssignmentInstancesCount(
					long kaleoTaskInstanceTokenId) {
					_executedMethodsNames.add(
						"getKaleoTaskAssignmentInstancesCount");
					if (kaleoTaskInstanceTokenId ==
							kaleoTaskInstanceToken.
								getKaleoTaskInstanceTokenId()) {
						return kaleoTaskAssignmentInstancesCount;
					}
					return -1;
				}
			};
	LazyWorkflowTaskAssigneeList lazyWorkflowTaskAssigneeList =
		new LazyWorkflowTaskAssigneeList(
			kaleoTaskInstanceToken,
			kaleoTaskAssignmentInstanceLocalService);
	Assert.assertEquals(
		kaleoTaskAssignmentInstancesCount,
		lazyWorkflowTaskAssigneeList.size());
	Assert.assertTrue(
		_executedMethodsNames.contains(
			"getKaleoTaskAssignmentInstancesCount"));
}