- private static String getVesNotification(final VesEventNotifierMock notificationProvider)
- throws InterruptedException {
- for (int i = 0; i < 1000; i++) {
- Thread.sleep(100);
- if (notificationProvider.getEvent() != null) {
- break;
+ private String getVesNotification(final VesEventNotifierMock notificationProvider) throws InterruptedException {
+ synchronized (notificationProvider) {
+ for (int i = 0; i < 1000; i++) {
+ notificationProvider.wait(200);
+ if (notificationProvider.getEvent() != null) {
+ break;
+ }