public static NotControllerException newPreMigrationException(OptionalInt controllerId) {
        if (controllerId.isPresent()) {
            return new NotControllerException("The controller is in pre-migration mode.");
        } else {
            return new NotControllerException("No controller appears to be active.");
        }
    }
@Test
    public void testNewPreMigrationExceptionWithNoController() {
        assertExceptionsMatch(new NotControllerException("No controller appears to be active."),
            newPreMigrationException(OptionalInt.empty()));
    }