### Question:
SpatialCameraSetup implements Sc2ApiSerializable<Sc2Api.SpatialCameraSetup> { public static SpatialCameraSetupSyntax spatialSetup() { return new Builder(); } private  SpatialCameraSetup(Builder builder); private  SpatialCameraSetup(Sc2Api.SpatialCameraSetup sc2ApiSpatialCameraSetup); static SpatialCameraSetupSyntax spatialSetup(); static SpatialCameraSetup from(Sc2Api.SpatialCameraSetup sc2ApiSpatialCameraSetup); @Override Sc2Api.SpatialCameraSetup toSc2Api(); Optional<Float> getWidth(); Size2dI getMap(); Size2dI getMinimap(); Optional<Boolean> getCropToPlayableArea(); Optional<Boolean> getAllowCheatingLayers(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenResolutionIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(spatialSetup()) .resolution(nothing()).minimap(MINIMAP_X, MINIMAP_Y).build()) .withMessage("resolution is required"); }
@Test void throwsExceptionWhenMinimapResolutionIsNotSet() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> fullAccessTo(spatialSetup()).resolution(MAP_X, MAP_Y).minimap(nothing()).build()) .withMessage("minimap is required"); }
@Test void throwsExceptionWhenWidthIsNotGreaterThanZero() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> spatialSetup() .width(0).resolution(MAP_X, MAP_Y).minimap(MINIMAP_X, MINIMAP_Y).build()) .withMessage("camera width has value 0.0 and is not greater than 0.0"); }