class ChangeStatusCommand implements StubDescriptorModificationCommand {

    @Override
    public Map<String, StubDescriptor> modify(Map<String, StubDescriptor> stubDescriptors) {
        Map<String, StubDescriptor> updated = new LinkedHashMap<>(stubDescriptors);
        StubDescriptor selected = updated.get(groupName);
        if (selected != null) {
            StubDescriptorAttributes attributes = selected.getAttributes();
            attributes.setActive(nextStatus);
            if (nextStatus) {
                logger.info(urlAccessLogMessageAssembler.assembleMessage(request, groupName + " stub configuration: Enabled"));
            } else {
                logger.info(urlAccessLogMessageAssembler.assembleMessage(request, groupName + " stub configuration: Disabled"));
            }
        }
        return updated;
    }

    public  ChangeStatusCommand(final boolean nextStatus, final String groupName, final HttpServletRequest request,
            final UrlAccessLogMessageAssembler urlAccessLogMessageAssembler);

}