### Question:
ResponseStep extends Response { public static ResponseStep from(Sc2Api.Response sc2ApiResponse) { if (!hasStepResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have step response"); } return new ResponseStep(sc2ApiResponse.getStep(), sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseStep(Sc2Api.ResponseStep responseStep, Sc2Api.Status sc2ApiStatus, int id); static ResponseStep from(Sc2Api.Response sc2ApiResponse); Optional<Integer> getSimulationLoop(); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveStep() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseStep.from(nothing())) .withMessage("provided argument doesn't have step response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseStep.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have step response"); }