// switch to second phase committed
reset(transactionStatus);
+ doNothing().when(transactionStatus).checkCommitStarted();
doNothing().when(transactionStatus).checkCommitted();
+ doNothing().when(transactionStatus).checkNotCommitted();
+
List<ModuleIdentifier> sortedModuleIdentifiers = tested
.getSortedModuleIdentifiers();
assertEquals(
* Simulate dependentResolver resolving its dependency identified by
* dependentName.
*/
- private void declareDependency(DependencyResolverImpl dependerResolver,
- ModuleIdentifier dependentName) {
+ private static void declareDependency(final DependencyResolverImpl dependerResolver,
+ final ModuleIdentifier dependentName) {
JmxAttribute dummyAttribute = new JmxAttribute("dummy");
dependerResolver.resolveInstance(Object.class,
ObjectNameUtil.createReadOnlyModuleON(dependentName),
dummyAttribute);
}
- private static void mockGetInstance(DependencyResolverManager tested,
- ModuleIdentifier moduleIdentifier) {
+ private static void mockGetInstance(final DependencyResolverManager tested,
+ final ModuleIdentifier moduleIdentifier) {
ModuleFactory moduleFactory = mock(ModuleFactory.class);
ModuleInternalInfo maybeOldInternalInfo = null;
private static Module mockedModule() {
Module mockedModule = mock(Module.class);
doReturn(mock(AutoCloseable.class)).when(mockedModule).getInstance();
+ doReturn(new ModuleIdentifier("fact", "instance")).when(mockedModule).getIdentifier();
return mockedModule;
}