### Question:
ResponseQuery extends Response { public static ResponseQuery from(Sc2Api.Response sc2ApiResponse) { if (!hasQueryResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have query response"); } return new ResponseQuery(sc2ApiResponse.getQuery(), sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseQuery(Query.ResponseQuery sc2ApiResponseQuery, Sc2Api.Status status, int id); static ResponseQuery from(Sc2Api.Response sc2ApiResponse); List<Pathing> getPathing(); List<AvailableAbilities> getAbilities(); List<BuildingPlacement> getPlacements(); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveQuery() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseQuery.from(nothing())) .withMessage("provided argument doesn't have query response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseQuery.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have query response"); }
@Test void convertsSc2ApiResponseQueryToResponseQuery() { assertThatAllFieldsAreProperlyConverted(ResponseQuery.from(sc2ApiResponseWithQuery())); }