RepairRunStatus { static double roundDoubleNicely(double intensity) { return Math.round(intensity * 10000f) / 10000f; } RepairRunStatus();  RepairRunStatus(
      UUID runId,
      String clusterName,
      String keyspaceName,
      Collection<String> columnFamilies,
      int segmentsRepaired,
      int totalSegments,
      RepairRun.RunState state,
      DateTime startTime,
      DateTime endTime,
      String cause,
      String owner,
      String lastEvent,
      DateTime creationTime,
      DateTime pauseTime,
      double intensity,
      boolean incrementalRepair,
      RepairParallelism repairParallelism,
      Collection<String> nodes,
      Collection<String> datacenters,
      Collection<String> blacklistedTables,
      int repairThreadCount,
      UUID repairUnitId);  RepairRunStatus(RepairRun repairRun, RepairUnit repairUnit, int segmentsRepaired); @JsonProperty("creation_time") String getCreationTimeIso8601(); @JsonProperty("creation_time") void setCreationTimeIso8601(String dateStr); @JsonProperty("start_time") String getStartTimeIso8601(); @JsonProperty("start_time") void setStartTimeIso8601(String dateStr); @JsonProperty("end_time") String getEndTimeIso8601(); @JsonProperty("end_time") void setEndTimeIso8601(String dateStr); @JsonProperty("pause_time") String getPauseTimeIso8601(); @JsonProperty("pause_time") void setPauseTimeIso8601(String dateStr); @JsonProperty("current_time") void setCurrentTimeIso8601(String dateStr); @JsonProperty("current_time") String getCurrentTimeIso8601(); String getCause(); void setCause(String cause); String getOwner(); void setOwner(String owner); UUID getId(); void setId(UUID id); String getClusterName(); void setClusterName(String clusterName); Collection<String> getColumnFamilies(); void setColumnFamilies(Collection<String> columnFamilies); String getKeyspaceName(); void setKeyspaceName(String keyspaceName); RepairRun.RunState getState(); void setState(RepairRun.RunState runState); DateTime getCreationTime(); void setCreationTime(DateTime creationTime); DateTime getStartTime(); void setStartTime(DateTime startTime); DateTime getEndTime(); void setEndTime(DateTime endTime); DateTime getPauseTime(); void setPauseTime(DateTime pauseTime); DateTime getCurrentTime(); void setCurrentTime(DateTime currentTime); double getIntensity(); void setIntensity(double intensity); boolean getIncrementalRepair(); void setIncrementalRepair(boolean incrementalRepair); int getTotalSegments(); void setTotalSegments(int segmentCount); RepairParallelism getRepairParallelism(); void setRepairParallelism(RepairParallelism repairParallelism); int getSegmentsRepaired(); void setSegmentsRepaired(int segmentsRepaired); String getLastEvent(); void setLastEvent(String lastEvent); String getDuration(); void setDuration(String duration); @JsonProperty("estimated_time_of_arrival") String getEstimatedTimeOfArrivalIso8601(); @JsonProperty("estimated_time_of_arrival") void setEstimatedTimeOfArrivalIso8601(String dateStr); Collection<String> getNodes(); void setNodes(Collection<String> nodes); Collection<String> getDatacenters(); void setDatacenters(Collection<String> datacenters); @JsonProperty("blacklisted_tables") Collection<String> getBlacklistedTables(); void setBlacklistedTables(Collection<String> blacklistedTables); int getRepairThreadCount(); void setRepairThreadCount(int repairThreadCount); @Nullable static String dateTimeToIso8601(@Nullable DateTime dateTime); UUID getRepairUnitId(); void setRepairUnitId(UUID repairUnitId);  }
@Test public void testRoundIntensity() throws Exception { assertEquals(0.0f, RepairRunStatus.roundDoubleNicely(0.0f), 0.00000f); assertEquals(0.1f, RepairRunStatus.roundDoubleNicely(0.1f), 0.00001f); assertEquals(0.2f, RepairRunStatus.roundDoubleNicely(0.2f), 0.00001f); assertEquals(0.3f, RepairRunStatus.roundDoubleNicely(0.3f), 0.00001f); assertEquals(0.4f, RepairRunStatus.roundDoubleNicely(0.4f), 0.00001f); assertEquals(0.5f, RepairRunStatus.roundDoubleNicely(0.5f), 0.00001f); assertEquals(0.6f, RepairRunStatus.roundDoubleNicely(0.6f), 0.00001f); assertEquals(0.7f, RepairRunStatus.roundDoubleNicely(0.7f), 0.00001f); assertEquals(0.8f, RepairRunStatus.roundDoubleNicely(0.8f), 0.00001f); assertEquals(0.9f, RepairRunStatus.roundDoubleNicely(0.9f), 0.00001f); assertEquals(1.0f, RepairRunStatus.roundDoubleNicely(1.0f), 0.00001f); }