RepairRun implements Comparable<RepairRun> { public static Builder builder(String clusterName, UUID repairUnitId) { return new Builder(clusterName, repairUnitId); } private  RepairRun(Builder builder, UUID id); static Builder builder(String clusterName, UUID repairUnitId); UUID getId(); UUID getRepairUnitId(); String getClusterName(); String getCause(); String getOwner(); RunState getRunState(); DateTime getCreationTime(); DateTime getStartTime(); DateTime getEndTime(); DateTime getPauseTime(); double getIntensity(); String getLastEvent(); int getSegmentCount(); RepairParallelism getRepairParallelism(); Set<String> getTables(); Builder with(); @Override int compareTo(RepairRun other); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void testNotStartedWithStartTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.NOT_STARTED) .startTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testRunningWithNoStartTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.RUNNING) .build(UUID.randomUUID()); }
@Test public void testRunningWithStartTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.RUNNING) .startTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testRunningWithEndTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.RUNNING) .startTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testRunningWithPauseTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.RUNNING) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test public void testPausedWithPauseTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.PAUSED) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testPausedWithNoPauseTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.PAUSED) .startTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testPausedWithEndTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.PAUSED) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testAbortedWithPauseTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.ABORTED) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test public void testAborted() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.ABORTED) .startTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testAbortedWithNoEndTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.ABORTED) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testDoneWithPauseTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.DONE) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test public void testDone() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.DONE) .startTime(DateTime.now()) .endTime(DateTime.now()) .build(UUID.randomUUID()); }
@Test(expected = IllegalStateException.class) public void testDoneWithNoEndTime() { RepairRun.builder("test", UUID.randomUUID()) .repairParallelism(RepairParallelism.DATACENTER_AWARE) .tables(TABLES) .intensity(1.0) .segmentCount(10) .runState(RunState.DONE) .startTime(DateTime.now()) .pauseTime(DateTime.now()) .build(UUID.randomUUID()); }