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