### Question:
ResponseGameInfo extends Response { public static ResponseGameInfo from(Sc2Api.Response sc2ApiResponse) { if (!hasGameInfoResponse(sc2ApiResponse)) { throw new IllegalArgumentException("provided argument doesn't have game info response"); } return new ResponseGameInfo(sc2ApiResponse.getGameInfo(), sc2ApiResponse.getStatus(), sc2ApiResponse.getId()); } private  ResponseGameInfo(Sc2Api.ResponseGameInfo sc2ApiResponseGameInfo, Sc2Api.Status status, int id); static ResponseGameInfo from(Sc2Api.Response sc2ApiResponse); String getMapName(); Set<String> getModNames(); Optional<LocalMap> getLocalMap(); Set<PlayerInfo> getPlayersInfo(); Optional<StartRaw> getStartRaw(); InterfaceOptions getInterfaceOptions(); PointI convertWorldToMinimap(Point2d world); PointI convertWorldToCamera(Point2d cameraWorld, Point2d world); Point2d findRandomLocation(); Point2d findRandomLocation(Point2d min, Point2d max); PointI findCenterOfMap(); @Override boolean equals(Object o); @Override boolean canEqual(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseDoesNotHaveGameInfo() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseGameInfo.from(nothing())) .withMessage("provided argument doesn't have game info response"); assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseGameInfo.from(aSc2ApiResponse().build())) .withMessage("provided argument doesn't have game info response"); }
@Test void throwsExceptionWhenMapNameIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseGameInfo.from( sc2ApiGameInfoWithout(Sc2Api.ResponseGameInfo.Builder::clearMapName))) .withMessage("map name is required"); }
@Test void throwsExceptionWhenInterfaceOptionsIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseGameInfo.from( sc2ApiGameInfoWithout(Sc2Api.ResponseGameInfo.Builder::clearOptions))) .withMessage("interface options is required"); }
@Test void throwsExceptionWhenPlayersInfoIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ResponseGameInfo.from( sc2ApiGameInfoWithout(Sc2Api.ResponseGameInfo.Builder::clearPlayerInfo))) .withMessage("players info is required"); }
@Test void convertsSc2ApiResponseGameInfoToResponseGameInfo() { assertThatAllFieldsAreProperlyConverted(ResponseGameInfo.from(sc2ApiResponseWithGameInfo())); }