### Question:
B2BService { public int dummyCustomerApi(Tenant tenant) { String tenantName = tenant.getName(); long count = callsCount.getCount(tenantName); LOGGER.debug("Counter for {} : {} ", tenant.getName(), count); if (count >= tenant.getAllowedCallsPerSecond()) { LOGGER.error("API access per second limit reached for: {}", tenantName); return -1; } callsCount.incrementCount(tenantName); return getRandomCustomerId(); } B2BService(Throttler timer, CallsCount callsCount); int dummyCustomerApi(Tenant tenant);  }### Answer:
@Test public void dummyCustomerApiTest() { Tenant tenant = new Tenant("testTenant", 2, callsCount); Throttler timer = () -> { }; B2BService service = new B2BService(timer, callsCount); for (int i = 0; i < 5; i++) { service.dummyCustomerApi(tenant); } long counter = callsCount.getCount(tenant.getName()); assertEquals(2, counter, "Counter limit must be reached"); }