44.6. assertPeriod 사용
어설션이 충족되면 Camel은 대기를 중지하고 assertIsSatisfied 방법을 계속 진행합니다. 즉, 약간 나중에 새로운 메시지가 모크 끝점에 도달하면 도착은 주장의 결과에 영향을 미치지 않습니다. 그 후 일정 기간 후에 새 메시지가 도착하지 않도록 테스트하려는 경우 setAssertPeriod 메서드를 설정하여 이를 수행할 수 있습니다. 예를 들면 다음과 같습니다.
MockEndpoint resultEndpoint = context.getEndpoint("mock:foo", MockEndpoint.class);
resultEndpoint.setAssertPeriod(5000);
resultEndpoint.expectedMessageCount(2);
// send some messages
// now lets assert that the mock:foo endpoint received 2 messages
resultEndpoint.assertIsSatisfied();