@Test public void testWriteCountersFactory() { Mockery context = new Mockery(); context.setImposteriser(ClassImposteriser.INSTANCE); MonitorFileWriter monitorWriter = context.mock(MonitorFileWriter.class); context.checking(new Expectations() {{ oneOf(monitorWriter).createGatewayCounterLabelsBuffer(); oneOf(monitorWriter).createGatewayCounterValuesBuffer(); }}); MMFGatewayWriter gatewayWriter = new MMFGatewayWriter(monitorWriter); assertNotNull(gatewayWriter); assertNotNull(gatewayWriter.writeCountersFactory()); }
@Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; }
MMFGatewayWriter implements GatewayWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } }
MMFGatewayWriter implements GatewayWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFGatewayWriter(MonitorFileWriter monitorFile); }
MMFGatewayWriter implements GatewayWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFGatewayWriter(MonitorFileWriter monitorFile); @Override MonitoringEntityFactory writeCountersFactory(); }
MMFGatewayWriter implements GatewayWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFGatewayWriter(MonitorFileWriter monitorFile); @Override MonitoringEntityFactory writeCountersFactory();  }