### Question:
PluginActivatingListDto { public static PluginActivatingListDto valueOf(List<Plugin> source) { PluginActivatingListDto activatingListDto = new PluginActivatingListDto(); List<PluginActivatingDto> activatingPlugins = new ArrayList<>(); for (Plugin plugin: source) { PluginActivatingDto activatingDto = new PluginActivatingDto(); activatingDto.setActivated(plugin.isEnabled()); activatingDto.setPluginName(plugin.getName()); activatingPlugins.add(activatingDto); } activatingListDto.setActivatingPlugins(activatingPlugins); return activatingListDto; } PluginActivatingListDto();  PluginActivatingListDto(List<PluginActivatingDto> activatingPlugins); static PluginActivatingListDto valueOf(List<Plugin> source); List<PluginActivatingDto> getActivatingPlugins(); void setActivatingPlugins(List<PluginActivatingDto> activatingPlugins);  }### Answer:
@Test public void testValueOf() { List<Plugin> plugins = new ArrayList<>(); plugins.add(new TestPlugin()); plugins.add(new TestPlugin()); PluginActivatingListDto result = PluginActivatingListDto.valueOf(plugins); assertEquals(result.getActivatingPlugins().size(), plugins.size()); List<PluginActivatingDto> pluginActivatingListDtos = result.getActivatingPlugins(); for (int i = 0; i < plugins.size(); i ++) { assertPluginActivatingDto(pluginActivatingListDtos.get(i), plugins.get(i)); } }