SignResponse extends JsonSerializable implements Persistable { public static SignResponse fromJson(String json) throws U2fBadInputException { checkArgument(json.length() < MAX_SIZE, "Client response bigger than allowed"); return fromJson(json, SignResponse.class); } @JsonCreator  SignResponse(@JsonProperty("clientData") String clientData, @JsonProperty("signatureData") String signatureData, @JsonProperty("keyHandle") String keyHandle); @JsonIgnore ClientData getClientData(); String getSignatureData(); String getKeyHandle(); String getRequestId(); static SignResponse fromJson(String json);  }
@Test(expected = IllegalArgumentException.class) public void fromJsonDetectsTooLongJsonContent() throws U2fBadInputException { SignResponse.fromJson(makeLongJson(20000)); fail("fromJson did not detect too long JSON content."); }
@Test public void fromJsonAllowsShortJsonContent() throws U2fBadInputException { assertNotNull(SignResponse.fromJson(makeLongJson(19999))); }