SegmentRunner implements RepairStatusHandler, Runnable { static String parseRepairId(String message) { Matcher uuidMatcher = REPAIR_UUID_PATTERN.matcher(message); if (uuidMatcher.find()) { return uuidMatcher.group(); } else { return null; } } private  SegmentRunner(
      AppContext context,
      ClusterFacade clusterFacade,
      UUID segmentId,
      Collection<String> potentialCoordinators,
      long timeoutMillis,
      double intensity,
      RepairParallelism validationParallelism,
      String clusterName,
      RepairUnit repairUnit,
      Set<String> tablesToRepair,
      RepairRunner repairRunner); static SegmentRunner create(
      AppContext context,
      ClusterFacade clusterFacade,
      UUID segmentId,
      Collection<String> potentialCoordinators,
      long timeoutMillis,
      double intensity,
      RepairParallelism validationParallelism,
      String clusterName,
      RepairUnit repairUnit,
      Set<String> tablesToRepair,
      RepairRunner repairRunner); @Override void run(); @Override void handle(
      int repairNo,
      Optional<ActiveRepairService.Status> status,
      Optional<ProgressEventType> progress,
      String message,
      JmxProxy jmxProxy);  }
@Test public void parseRepairIdTest() { String msg = "Repair session 883fd090-12f1-11e5-94c5-03d4762e50b7 for range (1,2] failed with"; assertEquals("883fd090-12f1-11e5-94c5-03d4762e50b7", SegmentRunner.parseRepairId(msg)); msg = "Two IDs: 883fd090-12f1-11e5-94c5-03d4762e50b7 883fd090-12f1-11e5-94c5-03d4762e50b7"; assertEquals("883fd090-12f1-11e5-94c5-03d4762e50b7", SegmentRunner.parseRepairId(msg)); msg = "No ID: foo bar baz"; assertEquals(null, SegmentRunner.parseRepairId(msg)); msg = "A message with bad ID 883fd090-fooo-11e5-94c5-03d4762e50b7"; assertEquals(null, SegmentRunner.parseRepairId(msg)); msg = "A message with good ID 883fd090-baad-11e5-94c5-03d4762e50b7"; assertEquals("883fd090-baad-11e5-94c5-03d4762e50b7", SegmentRunner.parseRepairId(msg)); }