### Question:
ObservationRaw implements Serializable { public static ObservationRaw from(Raw.ObservationRaw sc2ApiObservationRaw) { require("sc2api observation raw", sc2ApiObservationRaw); return new ObservationRaw(sc2ApiObservationRaw); } private  ObservationRaw(Raw.ObservationRaw sc2ApiObservationRaw); static ObservationRaw from(Raw.ObservationRaw sc2ApiObservationRaw); PlayerRaw getPlayer(); Set<Unit> getUnits(); Set<UnitSnapshot> getUnitSnapshots(); MapState getMapState(); Optional<Event> getEvent(); Set<EffectLocations> getEffects(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiObservationRawIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRaw.from(nothing())) .withMessage("sc2api observation raw is required"); }
@Test void convertsAllFieldsFromSc2ApiObservationRaw() { assertThatAllFieldsAreConverted(ObservationRaw.from(sc2ApiObservationRaw())); }
@Test void throwsExceptionWhenPlayerIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRaw.from(without( () -> sc2ApiObservationRaw().toBuilder(), Raw.ObservationRaw.Builder::clearPlayer).build())) .withMessage("player is required"); }
@Test void throwsExceptionWhenMapStateIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRaw.from(without( () -> sc2ApiObservationRaw().toBuilder(), Raw.ObservationRaw.Builder::clearMapState).build())) .withMessage("map state is required"); }