99
1010import java .io .IOException ;
1111import java .io .UnsupportedEncodingException ;
12- import java .net .MalformedURLException ;
1312import java .net .ServerSocket ;
1413import java .net .URISyntaxException ;
1514import java .net .UnknownHostException ;
2019import javax .xml .bind .DatatypeConverter ;
2120
2221import org .apache .http .client .ClientProtocolException ;
22+ import org .apache .http .conn .UnsupportedSchemeException ;
2323import org .json .JSONException ;
2424import org .json .JSONObject ;
2525import org .junit .BeforeClass ;
@@ -33,11 +33,11 @@ public class JenkinsManagerTest {
3333
3434 private static final String UNKNOWN_HOST = "!¤€31" ;
3535 private static final int PORT_OUT_OF_RANGE = 1000000 ;
36- private static final String INVALID_PROTOCOL = "httg" ;
3736 private static final String URL = "http://localhost" ;
3837 private static final String USERNAME = "username" ;
3938 private static final String PASSWORD = "password" ;
4039 private static final String PROTOCOL = "http" ;
40+ private static final String INVALID_PROTOCOL = "httg" ;
4141 private static final String HOST = "localhost" ;
4242 private static final String ENDPOINT_CRUMB = "/crumbIssuer/api/json" ;
4343 private static final String RESPONSE_CRUMB = "{\" crumb\" :\" fb171d526b9cc9e25afe80b356e12cb7\" ,\" crumbRequestField\" :\" .crumb\" }" ;
@@ -119,7 +119,7 @@ public void jenkinsManagerConstructorFailCrumb()
119119 assertEquals ("" , actualCrumb );
120120 }
121121
122- @ Test (expected = MalformedURLException .class )
122+ @ Test (expected = UnsupportedSchemeException .class )
123123 public void jenkinsManagerConstructorInvalidProtocol ()
124124 throws ClientProtocolException , URISyntaxException , IOException {
125125 new JenkinsManager (INVALID_PROTOCOL , HOST , port , USERNAME , PASSWORD );
0 commit comments