FunctionalDoublesSurface extends Surface<Double, Double, Double> { @Override public Double[] getYData() { throw new UnsupportedOperationException("Cannot get y data - this surface is defined by a function"); } FunctionalDoublesSurface(final Function<Double, Double> function);  FunctionalDoublesSurface(final Function<Double, Double> function, final String name); static FunctionalDoublesSurface from(final Function<Double, Double> function); static FunctionalDoublesSurface from(final Function<Double, Double> function, final String name); @Override Double[] getXData(); @Override Double[] getYData(); @Override Double[] getZData(); @Override int size(); @Override Double getZValue(final Double x, final Double y); @Override Double getZValue(final Pair<Double, Double> xy); Function<Double, Double> getFunction(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = UnsupportedOperationException.class) public void testGetYData() { SURFACE.getYData(); }