Add explicit mention that the mocked methods are generics using Objects.

These five lines were causing errors for me using Eclipse configured to
the Sun jdk1.8. Apparently there was no issue in IntelliJ and everything
worked fine from the command line before and after.

+review RM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@100076 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tom Page
2015-03-25 15:31:08 +00:00
parent 0cfc1a98bf
commit 0d4ed55675
2 changed files with 5 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure work is executed in transaction for each node processed
verify(mockedNodeService, times(2)).exists(any(NodeRef.class));
verify(mockedRetryingTransactionHelper, times(2)).doInTransaction(any(RetryingTransactionCallback.class));
verify(mockedRetryingTransactionHelper, times(2)).<Object>doInTransaction(any(RetryingTransactionCallback.class));
// ensure each node is process correctly
verify(mockedNodeService, times(1)).getProperty(node1, RecordsManagementModel.PROP_DISPOSITION_ACTION);
@@ -213,7 +213,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure work is executed in transaction for each node processed
verify(mockedNodeService, times(2)).exists(any(NodeRef.class));
verify(mockedRetryingTransactionHelper, times(2)).doInTransaction(any(RetryingTransactionCallback.class));
verify(mockedRetryingTransactionHelper, times(2)).<Object>doInTransaction(any(RetryingTransactionCallback.class));
// ensure each node is process correctly
// node1

View File

@@ -167,7 +167,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
return callback.execute();
}
};
doAnswer(doInTransactionAnswer).when(mockedRetryingTransactionHelper).doInTransaction(any(RetryingTransactionCallback.class));
doAnswer(doInTransactionAnswer).when(mockedRetryingTransactionHelper).<Object>doInTransaction(any(RetryingTransactionCallback.class));
// setup mocked authentication util
setupAuthenticationUtilMock();
@@ -215,7 +215,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
return work.doWork();
}
}).when(mockedAuthenticationUtil).runAsSystem(any(RunAsWork.class));
}).when(mockedAuthenticationUtil).<Object>runAsSystem(any(RunAsWork.class));
// just do the work
doAnswer(new Answer<Object>()
@@ -228,7 +228,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
return work.doWork();
}
}).when(mockedAuthenticationUtil).runAs(any(RunAsWork.class), anyString());
}).when(mockedAuthenticationUtil).<Object>runAs(any(RunAsWork.class), anyString());
// assume admin
doReturn("admin").when(mockedAuthenticationUtil).getAdminUserName();