class CacheUtil {

    public static List<Detector> buildDetectors(String detectorsString) {
        if (detectorsString == null || "".equals(detectorsString)) {
            return Collections.emptyList();
        }
        String[] detectors = detectorsString.split("\\|");
        return Arrays.asList(detectors).stream()
                .map(detector -> new Detector(detector.split(",")[0], UUID.fromString(detector.split(",")[1]))) //update
                .collect(Collectors.toList());
    }

}