@Test public void testLogErrorMsgWaitDefault() throws Exception { final String expectedErrorMessage = "This is a test error message!"; EasyMockSupport mockSupport = new EasyMockSupport(); Logger loggerMock = mockSupport.createMock(Logger.class); AtomicInteger testAtomicInteger = new AtomicInteger(0); loggerMock.error(expectedErrorMessage); expectLastCall().times(1); mockSupport.replayAll(); for (int i = 0; i < 1000; i++) { Utils.logErrorMessageWithCounter(loggerMock, testAtomicInteger, expectedErrorMessage); } mockSupport.verifyAll(); }
static void logErrorMessageWithCounter(Logger logger, AtomicInteger atomicInteger, String errorMessage) { logErrorMessageWithCounter(logger, atomicInteger, errorMessage, WAIT_COUNT_MAX); }
Utils { static void logErrorMessageWithCounter(Logger logger, AtomicInteger atomicInteger, String errorMessage) { logErrorMessageWithCounter(logger, atomicInteger, errorMessage, WAIT_COUNT_MAX); } }
Utils { static void logErrorMessageWithCounter(Logger logger, AtomicInteger atomicInteger, String errorMessage) { logErrorMessageWithCounter(logger, atomicInteger, errorMessage, WAIT_COUNT_MAX); } private  Utils(); }
Utils { static void logErrorMessageWithCounter(Logger logger, AtomicInteger atomicInteger, String errorMessage) { logErrorMessageWithCounter(logger, atomicInteger, errorMessage, WAIT_COUNT_MAX); } private  Utils();  }
Utils { static void logErrorMessageWithCounter(Logger logger, AtomicInteger atomicInteger, String errorMessage) { logErrorMessageWithCounter(logger, atomicInteger, errorMessage, WAIT_COUNT_MAX); } private  Utils();   }