EmbeddableOptionsDataSourceServlet extends SlingSafeMethodsServlet { @Override protected void doGet(@NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) { SimpleDataSource embeddableOptionsDataSource = new SimpleDataSource(getEmbeddableOptions(request).iterator()); request.setAttribute(DataSource.class.getName(), embeddableOptionsDataSource); }   static final String RESOURCE_TYPE_V1; }
@Test public void testEmbeddableOptionsDataSourceServlet() { dataSourceServlet.doGet(context.request(), context.response()); DataSource dataSource = (DataSource) context.request().getAttribute(DataSource.class.getName()); Assertions.assertNotNull(dataSource); dataSource.iterator().forEachRemaining(Assertions::assertNotNull); }