Skip to content

Commit

Permalink
add casting. fixes jdk7 test
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed May 3, 2018
1 parent c20a76c commit 8ae7239
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/com/auth0/net/CustomRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public void shouldParseJSONErrorResponseWithError() throws Exception {
assertThat(authException.getStatusCode(), is(400));
}

@SuppressWarnings("RedundantCast")
@Test
public void shouldParseJSONErrorResponseWithDescriptionAndExtraProperties() throws Exception {
CustomRequest<List> request = new CustomRequest<>(client, server.getBaseUrl(), "GET", listType);
Expand All @@ -232,7 +233,7 @@ public void shouldParseJSONErrorResponseWithDescriptionAndExtraProperties() thro
APIException authException = (APIException) exception;
assertThat(authException.getDescription(), is("Multifactor authentication required"));
assertThat(authException.getError(), is("mfa_required"));
assertThat(authException.getValue("mfa_token"), is("Fe26...Ha"));
assertThat(authException.getValue("mfa_token"), is((Object) "Fe26...Ha"));
assertThat(authException.getValue("non_existing_key"), is(nullValue()));
assertThat(authException.getStatusCode(), is(400));
}
Expand Down

0 comments on commit 8ae7239

Please sign in to comment.