### Question:
ResponseSaveReplay extends Response { public static ResponseSaveReplay from(Sc2Api.Response sc2ApiResponse) { if (!hasSaveReplayResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have save replay response"); } return new ResponseSaveReplay( sc2ApiResponse.getSaveReplay(), sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseSaveReplay(
            Sc2Api.ResponseSaveReplay sc2ApiResponseSaveReplay, Sc2Api.Status sc2ApiStatus, int id); static ResponseSaveReplay from(Sc2Api.Response sc2ApiResponse); byte[] getData(); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveSaveReplay() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseSaveReplay.from(nothing())) .withMessage("provided argument doesn't have save replay response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseSaveReplay.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have save replay response"); }
@Test void throwsExceptionWhenDataIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseSaveReplay.from(sc2ApiResponseWithSaveReplayWithoutData())) .withMessage("data is required"); }