### Question:
ObservationRender implements Serializable { public static ObservationRender from(Spatial.ObservationRender sc2ApiObservationRender) { require("sc2api observation render", sc2ApiObservationRender); return new ObservationRender(sc2ApiObservationRender); } private  ObservationRender(Spatial.ObservationRender sc2ApiObservationRender); static ObservationRender from(Spatial.ObservationRender sc2ApiObservationRender); ImageData getMap(); ImageData getMinimap(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiObservationRenderIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRender.from(nothing())) .withMessage("sc2api observation render is required"); }
@Test void convertsAllFieldsFromSc2ApiObservationRender() { assertThatAllFieldsAreConverted(ObservationRender.from(sc2ApiObservationRender())); }
@Test void throwsExceptionWhenMapIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRender.from(without( () -> sc2ApiObservationRender().toBuilder(), Spatial.ObservationRender.Builder::clearMap).build())) .withMessage("map is required"); }
@Test void throwsExceptionWhenMinimapIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ObservationRender.from(without( () -> sc2ApiObservationRender().toBuilder(), Spatial.ObservationRender.Builder::clearMinimap).build())) .withMessage("minimap is required"); }