use of com.hazelcast.internal.memory.DefaultMemoryStats in project hazelcast by hazelcast.
the class TestNodeContext method createNodeExtension.
@Override
public NodeExtension createNodeExtension(Node node) {
when(nodeExtension.createService(MapService.class)).thenReturn(mock(MapService.class));
when(nodeExtension.createService(ICacheService.class)).thenReturn(mock(ICacheService.class));
when(nodeExtension.createService(WanReplicationService.class)).thenReturn(mock(WanReplicationService.class));
when(nodeExtension.createService(eq(ClusterWideConfigurationService.class), any())).thenAnswer(invocation -> new ClusterWideConfigurationService((NodeEngine) invocation.getArguments()[1], mock(DynamicConfigListener.class)));
when(nodeExtension.createSerializationService()).thenReturn(new DefaultSerializationServiceBuilder().build());
when(nodeExtension.isStartCompleted()).thenReturn(true);
when(nodeExtension.isNodeVersionCompatibleWith(any(Version.class))).thenReturn(true);
when(nodeExtension.getMemoryStats()).thenReturn(new DefaultMemoryStats());
when(nodeExtension.createMemberUuid()).thenReturn(UuidUtil.newUnsecureUUID());
when(nodeExtension.getCPPersistenceService()).thenReturn(new NopCPPersistenceService());
when(nodeExtension.getAuditlogService()).thenReturn(NoOpAuditlogService.INSTANCE);
return nodeExtension;
}
Aggregations