@Test public void getAssetRenditionDispatchers() { AssetRenditionDispatcher one = new StaticRenditionDispatcherImpl(); AssetRenditionDispatcher two = new InternalRedirectRenditionDispatcherImpl(); AssetRenditionDispatcher three = new InternalRedirectRenditionDispatcherImpl(); ctx.registerService(AssetRenditionDispatcher.class, two, Constants.SERVICE_RANKING, 90); ctx.registerService(AssetRenditionDispatcher.class, one, Constants.SERVICE_RANKING, 100); ctx.registerService(AssetRenditionDispatcher.class, three, Constants.SERVICE_RANKING, 80, "rendition.mappings", "foo=bar,test-rendition=im real"); final AssetRenditionDispatchers assetRenditionDispatchers = ctx.getService(AssetRenditionDispatchers.class); final List<AssetRenditionDispatcher> actual = assetRenditionDispatchers.getAssetRenditionDispatchers(); assertEquals(3, actual.size()); assertSame(one, actual.get(0)); assertSame(two, actual.get(1)); assertSame(three, actual.get(2)); }
@Override public List<AssetRenditionDispatcher> getAssetRenditionDispatchers() { if (assetRenditionDispatchers == null || assetRenditionDispatchers.getList() == null) { return Collections.EMPTY_LIST; } else { return ImmutableList.copyOf(assetRenditionDispatchers.getList()); } }
AssetRenditionDispatchersImpl implements AssetRenditionDispatchers { @Override public List<AssetRenditionDispatcher> getAssetRenditionDispatchers() { if (assetRenditionDispatchers == null || assetRenditionDispatchers.getList() == null) { return Collections.EMPTY_LIST; } else { return ImmutableList.copyOf(assetRenditionDispatchers.getList()); } } }
AssetRenditionDispatchersImpl implements AssetRenditionDispatchers { @Override public List<AssetRenditionDispatcher> getAssetRenditionDispatchers() { if (assetRenditionDispatchers == null || assetRenditionDispatchers.getList() == null) { return Collections.EMPTY_LIST; } else { return ImmutableList.copyOf(assetRenditionDispatchers.getList()); } }  }
AssetRenditionDispatchersImpl implements AssetRenditionDispatchers { @Override public List<AssetRenditionDispatcher> getAssetRenditionDispatchers() { if (assetRenditionDispatchers == null || assetRenditionDispatchers.getList() == null) { return Collections.EMPTY_LIST; } else { return ImmutableList.copyOf(assetRenditionDispatchers.getList()); } }  @Override List<AssetRenditionDispatcher> getAssetRenditionDispatchers(); @Override boolean isValidAssetRenditionName(final String name); }
AssetRenditionDispatchersImpl implements AssetRenditionDispatchers { @Override public List<AssetRenditionDispatcher> getAssetRenditionDispatchers() { if (assetRenditionDispatchers == null || assetRenditionDispatchers.getList() == null) { return Collections.EMPTY_LIST; } else { return ImmutableList.copyOf(assetRenditionDispatchers.getList()); } }  @Override List<AssetRenditionDispatcher> getAssetRenditionDispatchers(); @Override boolean isValidAssetRenditionName(final String name);  }