### Question:
OperationStore { long getMaxRate(CTSOperation operation) { final OperationMonitor monitor = operationRate.get(operation); return monitor == null ? 0L : monitor.getMaxRate(); } OperationStore();   OperationStore(final OperationRateFactory operationRateFactory,
            final Map<CTSOperation, OperationMonitor> operationRate);   }### Answer:
@Test public void shouldGetMaximumRate() { CTSOperation operation = CTSOperation.CREATE; OperationMonitor opRate = mock(OperationMonitor.class); operationRate.put(operation, opRate); given(opRate.getMaxRate()).willReturn(1L); long result = operationStore.getMaxRate(operation); assertEquals(result, 1L); }
@Test public void getMaximumRateShouldReturnZeroIfOperationNotSet() { CTSOperation operation = CTSOperation.CREATE; long result = operationStore.getMaxRate(operation); assertEquals(result, 0L); }