### Question:
ResponseQuickLoad extends Response { public static ResponseQuickLoad from(Sc2Api.Response sc2ApiResponse) { if (!hasQuickLoadResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have quick load response"); } return new ResponseQuickLoad(sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseQuickLoad(Sc2Api.Status sc2ApiStatus, int id); static ResponseQuickLoad from(Sc2Api.Response sc2ApiResponse); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveQuickLoad() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseQuickLoad.from(nothing())) .withMessage("provided argument doesn't have quick load response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseQuickLoad.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have quick load response"); }
@Test void convertsSc2ApiResponseQuickLoadToResponseQuickLoad() { ResponseQuickLoad responseQuickLoad = ResponseQuickLoad.from(sc2ApiResponseWithQuickLoad()); assertThat(responseQuickLoad).as("converted response quick load").isNotNull(); assertThat(responseQuickLoad.getType()).as("type of quick load response").isEqualTo(ResponseType.QUICK_LOAD); assertThat(responseQuickLoad.getStatus()).as("status of quick load response").isEqualTo(GameStatus.IN_GAME); }