FunctionalSurface extends Surface<U, U, V> { @Override public U[] getYData() { throw new UnsupportedOperationException("Cannot get y data - this surface is defined by a function"); } FunctionalSurface(final Function2D<U, V> function); @Override U[] getXData(); @Override U[] getYData(); @Override V[] getZData(); @Override int size(); @Override V getZValue(final U x, final U y); @Override V getZValue(final Pair<U, U> xy);  }
@Test(expectedExceptions = UnsupportedOperationException.class) public void noYDataTest() { s_surface.getYData(); }