Search in sources :

Example 1 with StatRecorder

use of org.apache.geode.distributed.internal.membership.gms.messenger.StatRecorder in project geode by apache.

the class StatRecorderJUnitTest method setUp.

@Before
public void setUp() throws Exception {
    stats = new MyStats();
    // create a StatRecorder that has mock up/down protocols and stats
    mockDownProtocol = mock(Protocol.class);
    mockUpProtocol = mock(Protocol.class);
    services = mock(Services.class);
    when(services.getStatistics()).thenReturn(stats);
    recorder = new StatRecorder();
    recorder.setServices(services);
    recorder.setUpProtocol(mockUpProtocol);
    recorder.setDownProtocol(mockDownProtocol);
}
Also used : Services(org.apache.geode.distributed.internal.membership.gms.Services) StatRecorder(org.apache.geode.distributed.internal.membership.gms.messenger.StatRecorder) Protocol(org.jgroups.stack.Protocol) Before(org.junit.Before)

Aggregations

Services (org.apache.geode.distributed.internal.membership.gms.Services)1 StatRecorder (org.apache.geode.distributed.internal.membership.gms.messenger.StatRecorder)1 Protocol (org.jgroups.stack.Protocol)1 Before (org.junit.Before)1