@Test public void testWriteCountersFactory() { Mockery context = new Mockery(); context.setImposteriser(ClassImposteriser.INSTANCE); MonitorFileWriter monitorWriter = context.mock(MonitorFileWriter.class); context.checking(new Expectations() {{ oneOf(monitorWriter).createServiceCounterLabelsBuffer(0); oneOf(monitorWriter).createServiceCounterValuesBuffer(0); }}); MMFServiceWriter serviceWriter = new MMFServiceWriter(monitorWriter, 0); assertNotNull(serviceWriter); assertNotNull(serviceWriter.writeCountersFactory()); }
@Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; }
MMFServiceWriter implements ServiceWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } }
MMFServiceWriter implements ServiceWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFServiceWriter(MonitorFileWriter monitorFile, int index); }
MMFServiceWriter implements ServiceWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFServiceWriter(MonitorFileWriter monitorFile, int index); @Override MonitoringEntityFactory writeCountersFactory(); }
MMFServiceWriter implements ServiceWriter { @Override public MonitoringEntityFactory writeCountersFactory() { createCountersManager(); MonitoringEntityFactory factory = new AgronaMonitoringEntityFactory(countersManager); return factory; } MMFServiceWriter(MonitorFileWriter monitorFile, int index); @Override MonitoringEntityFactory writeCountersFactory();  }