private void checkCorrectParameters(Map<ConfigurationParameters, Object> parameters) throws IllegalArgumentException {
        if (!(parameters.containsKey(ConfigurationParameters.PORT) &&
            parameters.containsKey(ConfigurationParameters.IS_ANY_HAS_ACCESS))) {
            throwException(SimpleServerException.ILLEGAL_ARGUMENT);
        }
        if (parameters.get(ConfigurationParameters.PORT).getClass() != Integer.class) {
            throwException(SimpleServerException.ILLEGAL_ARGUMENT);
        }
        if (parameters.get(ConfigurationParameters.IS_ANY_HAS_ACCESS).getClass() != Boolean.class) {
            throwException(SimpleServerException.ILLEGAL_ARGUMENT);
        }
        if (!isAnyHasAccess) {
            if ((parameters.get(ConfigurationParameters.USER).getClass() != String.class) || (parameters.get(ConfigurationParameters.PASSWORD).getClass() != String.class)) {
                throwException(SimpleServerException.ILLEGAL_ARGUMENT);
            }
        }
    }