@Test public void testGetNativeSizeReturnsReturnsSameSizeAsCachedProvider() { NiftyImage image = createMock(NiftyImage.class); AreaProvider areaProvider = createMock(AreaProvider.class); expect(areaProvider.getNativeSize(image)).andReturn(new Size(1, 2)).anyTimes(); replay(areaProvider); CachedAreaProvider cachedAreaProvider = new CachedAreaProvider(areaProvider); assertEquals(cachedAreaProvider.getNativeSize(image), areaProvider.getNativeSize(image)); verify(areaProvider); }
@Nonnull @Override public Size getNativeSize(@Nonnull NiftyImage image) { return m_cachedProvider.getNativeSize(image); }
CachedAreaProvider implements AreaProvider { @Nonnull @Override public Size getNativeSize(@Nonnull NiftyImage image) { return m_cachedProvider.getNativeSize(image); } }
CachedAreaProvider implements AreaProvider { @Nonnull @Override public Size getNativeSize(@Nonnull NiftyImage image) { return m_cachedProvider.getNativeSize(image); } CachedAreaProvider(AreaProvider cachedProvider); }
CachedAreaProvider implements AreaProvider { @Nonnull @Override public Size getNativeSize(@Nonnull NiftyImage image) { return m_cachedProvider.getNativeSize(image); } CachedAreaProvider(AreaProvider cachedProvider); @Override void setParameters(String parameters); @Nullable @Override Box getSourceArea(@Nonnull RenderImage renderImage); @Nonnull @Override Size getNativeSize(@Nonnull NiftyImage image); }
CachedAreaProvider implements AreaProvider { @Nonnull @Override public Size getNativeSize(@Nonnull NiftyImage image) { return m_cachedProvider.getNativeSize(image); } CachedAreaProvider(AreaProvider cachedProvider); @Override void setParameters(String parameters); @Nullable @Override Box getSourceArea(@Nonnull RenderImage renderImage); @Nonnull @Override Size getNativeSize(@Nonnull NiftyImage image);  }