### Question:
ReplayInfo implements Serializable { public static ReplayInfo from(Sc2Api.ResponseReplayInfo sc2ApiResponseReplayInfo) { require("sc2api response replay info", sc2ApiResponseReplayInfo); return new ReplayInfo(sc2ApiResponseReplayInfo); } private  ReplayInfo(Sc2Api.ResponseReplayInfo sc2ApiResponseReplayInfo); static ReplayInfo from(Sc2Api.ResponseReplayInfo sc2ApiResponseReplayInfo); Optional<BattlenetMap> getBattlenetMap(); Optional<LocalMap> getLocalMap(); Set<PlayerInfoExtra> getPlayerInfo(); int getGameDurationLoops(); float getGameDurationSeconds(); String getGameVersion(); String getDataVersion(); int getBaseBuild(); int getDataBuild(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiResponseReplayInfoIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ReplayInfo.from(nothing())) .withMessage("sc2api response replay info is required"); }
@Test void convertsSc2ApiReplayInfoToReplayInfo() { assertThatAllFieldsAreMapped(ReplayInfo.from(sc2ApiResponseReplayInfo())); }
@Test void throwsExceptionWhenMapInfoIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ReplayInfo.from(sc2ApiReplayInfoWithoutMap())) .withMessage("map info (local or battlenet) is required"); }