@Test
public void testRemoveErrorParameter() {

    final String baseUrl = "https://wwww.jahia.com/cms/login";
    String url = baseUrl + "?loginError=tutu";
    String result = Login.removeErrorParameter(url);
    Assert.assertEquals(baseUrl, result);
    url = baseUrl + "?loginError=tutu&tata=toto";
    result = Login.removeErrorParameter(url);
    Assert.assertEquals(baseUrl + "?tata=toto", result);
    url = baseUrl + "?titi=tete&loginError=tutu&tata=toto";
    result = Login.removeErrorParameter(url);
    Assert.assertEquals(baseUrl + "?titi=tete&tata=toto", result);
    url = baseUrl + "?titi=tete&tata=toto&loginError=tutu";
    result = Login.removeErrorParameter(url);
    Assert.assertEquals(baseUrl + "?titi=tete&tata=toto", result);
}