@Test
public void validateSignalingParams_Invalid() {

    HashMap<String, Object> settingParams = new HashMap<String, Object>();
    //push settings
    //SIGNALING_USERNAME missing
    try {
        getFilledHashMapWithValidPush(settingParams);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_USERNAME);
    }
    //SIGNALING_USERNAME ""
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_USERNAME);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE wrong provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, 10);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_ICE_SERVER_DISCOVERY_TYPE);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM media ice not provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CUSTOM);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY_NO_ICE_SERVERS);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM empty media ice provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CUSTOM);
        List<Map<String, String>> listMediaIceServers = new ArrayList<>();
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS, listMediaIceServers);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY_NO_ICE_SERVERS);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM  media ice provided with no ice server url
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CUSTOM);
        List<Map<String, String>> listMediaIceServers = new ArrayList<>();
        Map<String, String> value = new HashMap<>();
        value.put("", "");
        listMediaIceServers.add(value);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS, listMediaIceServers);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM  MEDIA_ICE_URL provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledWithMediaParams(settingParams);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_URL, "media_ice_url");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM   MEDIA_ICE_USERNAME provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledWithMediaParams(settingParams);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME, "media_ice_username");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM   MEDIA_ICE_PASSWORD provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledWithMediaParams(settingParams);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD, "media_ice_password");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE CUSTOM   MEDIA_ICE_DOMAIN provided
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledWithMediaParams(settingParams);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN, "media_ice_domain");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE NOT CUSTOM not custom discovery
    try {
        settingParams = new HashMap<String, Object>();
        getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        List<Map<String, String>> listMediaIceServers = new ArrayList<>();
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS, listMediaIceServers);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_INVALID_ICE_SERVERS_NOT_CUSTOM_DISCOVERY);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE NOT CUSTOM missinf ice url
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3);
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_ICE_URL);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE NOT CUSTOM missing ice username
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_URL, "media_ice_url");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_ICE_USERNAME);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE NOT CUSTOM missing ice password
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_URL, "media_ice_url");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME, "media_ice_username");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_ICE_PASSWORD);
    }
    //MEDIA_ICE_SERVERS_DISCOVERY_TYPE NOT CUSTOM missing ice domain
    try {
        settingParams = new HashMap<String, Object>();
        settingParams = getFilledHashMapWithValidPush(settingParams);
        settingParams.put(RCDevice.ParameterKeys.SIGNALING_USERNAME, "username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE, RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3);
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_URL, "media_ice_url");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME, "media_ice_username");
        settingParams.put(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD, "media_ice_password");
        RCUtils.validateSettingsParms(settingParams);
    } catch (RCException ex) {
        assertThat(ex.errorCode).isEqualTo(RCClient.ErrorCodes.ERROR_DEVICE_MISSING_ICE_DOMAIN);
    }
}