private void assertSavedAdmin(String id, AdminAttributes adminAttributes) {
		long timeout = System.currentTimeMillis() + 15000;
		boolean foundAdmin = false;
		while (!foundAdmin && System.currentTimeMillis() < timeout) {
			try {
				Thread.sleep(200);
				Admin admin = adminRepository.findOne(id);
				if (admin != null && compareAdminAttributes(admin.getAttributes(), adminAttributes)) {
					foundAdmin = true;
				}
			}
			catch (InterruptedException e) {
				Thread.currentThread().interrupt();
				break;
			}
		}
		assertTrue("Admin repository is not updated with the test containers", foundAdmin);
	}
Assert if the saved container exists in the {@link ContainerRepository}

@param id the containerId
@param adminAttributes the admin attributes
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/container/store/ZooKeeperAdminRepositoryTests.java