### Question:
ClockState { int activeSampleCount() { synchronized (mutex) { return samples.size(); } } ClockState();   }### Answer:
@Test public void testActiveSampleCount() { clockState = new ClockState(); for (int i = 0; i < MIN_SAMPLE_SIZE + 1; i++) { assertEquals(i, clockState.activeSampleCount()); clockState.addSample(ORIGIN_MICROS, RECEIVE_MICROS, TRANSMIT_MICROS, DESTINATION_MICROS); } }