### Question:
InterpolatedNodalSurface implements NodalSurface, ImmutableBean, Serializable { public static InterpolatedNodalSurface of( SurfaceMetadata metadata, DoubleArray xValues, DoubleArray yValues, DoubleArray zValues, SurfaceInterpolator interpolator) { return new InterpolatedNodalSurface(metadata, xValues, yValues, zValues, interpolator); } @ImmutableConstructor private  InterpolatedNodalSurface(
      SurfaceMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      DoubleArray zValues,
      SurfaceInterpolator interpolator); private  InterpolatedNodalSurface(
      SurfaceMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      DoubleArray zValues,
      SurfaceInterpolator interpolator,
      boolean sort); static InterpolatedNodalSurface of(
      SurfaceMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      DoubleArray zValues,
      SurfaceInterpolator interpolator); static InterpolatedNodalSurface ofUnsorted(
      SurfaceMetadata metadata,
      DoubleArray xValues,
      DoubleArray yValues,
      DoubleArray zValues,
      SurfaceInterpolator interpolator); @Override int getParameterCount(); @Override double getParameter(int parameterIndex); @Override InterpolatedNodalSurface withParameter(int parameterIndex, double newValue); @Override InterpolatedNodalSurface withPerturbation(ParameterPerturbation perturbation); @Override double zValue(double x, double y); @Override UnitParameterSensitivity zValueParameterSensitivity(double x, double y); @Override InterpolatedNodalSurface withMetadata(SurfaceMetadata metadata); @Override InterpolatedNodalSurface withZValues(DoubleArray zValues); @Override UnitParameterSensitivity createParameterSensitivity(DoubleArray sensitivities); @Override CurrencyParameterSensitivity createParameterSensitivity(Currency currency, DoubleArray sensitivities); static InterpolatedNodalSurface.Meta meta(); static InterpolatedNodalSurface.Builder builder(); @Override InterpolatedNodalSurface.Meta metaBean(); @Override SurfaceMetadata getMetadata(); @Override DoubleArray getXValues(); @Override DoubleArray getYValues(); @Override DoubleArray getZValues(); SurfaceInterpolator getInterpolator(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_invalid() { assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA, DoubleArray.of(1d), DoubleArray.of(2d), DoubleArray.of(3d), INTERPOLATOR)); assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA, XVALUES, DoubleArray.of(1d, 3d), ZVALUES, INTERPOLATOR)); assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA, XVALUES, YVALUES, DoubleArray.of(1d, 3d), INTERPOLATOR)); assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA_ENTRIES, DoubleArray.of(1d, 3d), DoubleArray.of(1d, 3d), DoubleArray.of(1d, 3d), INTERPOLATOR)); assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA, DoubleArray.of(2d, 1d), DoubleArray.of(1d, 1d), DoubleArray.of(2d, 3d), INTERPOLATOR)); assertThatIllegalArgumentException() .isThrownBy(() -> InterpolatedNodalSurface.of( METADATA, DoubleArray.of(1d, 1d), DoubleArray.of(2d, 1d), DoubleArray.of(2d, 3d), INTERPOLATOR)); }
@Test public void test_serialization() { InterpolatedNodalSurface test = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR); assertSerialization(test); }