### Question:
NamedTransformImageServlet extends SlingSafeMethodsServlet implements OptingServlet { protected final ValueMap getImageTransformersWithParams( final List<NamedImageTransformer> selectedNamedImageTransformers) { final ValueMap params = new ValueMapDecorator(new LinkedHashMap<String, Object>()); for (final NamedImageTransformer namedImageTransformer : selectedNamedImageTransformers) { params.putAll(namedImageTransformer.getImageTransforms()); } return params; }  @Override final boolean accepts(final SlingHttpServletRequest request); static final String NAME_IMAGE; static final String NAMED_IMAGE_FILENAME_PATTERN; static final String DEFAULT_FILENAME_PATTERN; static final String RT_LOCAL_SOCIAL_IMAGE; static final String RT_REMOTE_SOCIAL_IMAGE; }### Answer:
@Test public void test_getImageTransformersWithParams() { List<NamedImageTransformer> selectedNamedImageTransformers = new ArrayList<NamedImageTransformer>(); selectedNamedImageTransformers.add(featureImageTransformer); selectedNamedImageTransformers.add(smallImageTransformer); final ValueMap imageTransformersWithParams = servlet.getImageTransformersWithParams(selectedNamedImageTransformers); assertEquals(IMAGE_TRANSFORM_RESIZE, imageTransformersWithParams.keySet().toArray()[0]); ValueMap resize = (ValueMap) imageTransformersWithParams.values().toArray()[0]; assertEquals("width", resize.keySet().toArray()[0]); assertEquals("10", resize.values().toArray()[0]); assertEquals(1, resize.keySet().size()); assertEquals(IMAGE_TRANSFORM_GREYSCALE, imageTransformersWithParams.keySet().toArray()[1]); ValueMap greyscale = (ValueMap) imageTransformersWithParams.values().toArray()[1]; assertEquals("greyscale", greyscale.keySet().toArray()[0]); assertEquals("true", greyscale.values().toArray()[0]); }