@Test public void testActivateWithoutCassandraCausesNoHostAvailableException() { Session session = mock(Session.class); Cluster cluster = mock(Cluster.class); doThrow(NoHostAvailableException.class).when(cluster).getMetadata(); doReturn(cluster).when(session).getCluster(); assertThatExceptionOfType(NoHostAvailableException.class) .isThrownBy(() -> TimeBasedRunPolicy.builder() .withSession(session) .withStatementDecorator(s -> s) .build()); }
public static Builder builder() { return new Builder(); }
TimeBasedRunPolicy implements TableRepairPolicy, RunPolicy, Closeable { public static Builder builder() { return new Builder(); } }
TimeBasedRunPolicy implements TableRepairPolicy, RunPolicy, Closeable { public static Builder builder() { return new Builder(); } TimeBasedRunPolicy(Builder builder); }
TimeBasedRunPolicy implements TableRepairPolicy, RunPolicy, Closeable { public static Builder builder() { return new Builder(); } TimeBasedRunPolicy(Builder builder); @Override long validate(ScheduledJob job); @Override boolean shouldRun(TableReference tableReference); @Override void close(); static Builder builder(); }
TimeBasedRunPolicy implements TableRepairPolicy, RunPolicy, Closeable { public static Builder builder() { return new Builder(); } TimeBasedRunPolicy(Builder builder); @Override long validate(ScheduledJob job); @Override boolean shouldRun(TableReference tableReference); @Override void close(); static Builder builder();  }