class RoutingService {

    public ResponseDescriptorDTO getResponseDescriptorDTOAndRemove(final String key) {
        ResponseDescriptorDTO responseDescriptor = responseDescriptorMap.get(key);
        if (responseDescriptor != null) {
            responseDescriptorMap.remove(key);
        }
        return responseDescriptor;
    }

}