public boolean hasRequiredCoordinatorSidecars()
    {
        if (currentCoordinatorSidecarCount > 1) {
            throw new PrestoException(TOO_MANY_SIDECARS,
                    format("Expected a single active coordinator sidecar. Found %s active coordinator sidecars", currentCoordinatorSidecarCount));
        }
        return currentCoordinatorSidecarCount == 1;
    }
@Test(expectedExceptions = PrestoException.class, expectedExceptionsMessageRegExp = "Expected a single active coordinator sidecar. Found 2 active coordinator sidecars")
    public void testHasRequiredCoordinatorSidecarsMoreThanOne()
            throws InterruptedException
    {
        assertFalse(monitor.hasRequiredCoordinatorSidecars());
        for (int i = numCoordinatorSidecars.get(); i < DESIRED_COORDINATOR_SIDECAR_COUNT + 1; i++) {
            addCoordinatorSidecar(nodeManager);
        }
        assertFalse(monitor.hasRequiredCoordinatorSidecars());
    }