### Question:
MjmlImageImpl implements MjmlComponent { @Override @Nonnull public Map<String, String> getAttributes() { return attributes; } @Inject  MjmlImageImpl(@Self @Via("resource") Resource self, @Self Image image); @Override @Nonnull Map<String, String> getAttributes();  }### Answer:
@Test public void testSrcSet() { Image image = mock(Image.class); when(image.getWidths()).thenReturn(new int[] { 1920, 640, 800 }); when(image.getSrcUriTemplate()).thenReturn("/content/path/to/image.coreimg{.width}.jpg"); Resource resouce = CONTEXT.create().resource("/content/path/to/image"); MjmlImageImpl mjmlImage = new MjmlImageImpl(resouce, image); String srcset = mjmlImage.getAttributes().get("srcset"); assertNotNull(srcset); assertEquals("/content/path/to/image.coreimg.640.jpg 640w, " + "/content/path/to/image.coreimg.800.jpg 800w, " + "/content/path/to/image.coreimg.1920.jpg 1920w", srcset); }