@Test
public void schedulesRepairForAllKeyspacesInAllClusters() throws Exception {

  // https://github.com/thelastpickle/cassandra-reaper/issues/298
  context.config.getAutoScheduling().setExcludedKeyspaces(null);
  context.storage.addCluster(cluster);
  when(jmxProxy.getKeyspaces()).thenReturn(Lists.newArrayList("keyspace1", "keyspace3"));
  when(jmxProxy.getTablesForKeyspace("keyspace1")).thenReturn(
          Sets.newHashSet(Table.builder().withName("table1").withCompactionStrategy(STCS).build()));
  when(jmxProxy.getTablesForKeyspace("keyspace3")).thenReturn(
          Sets.newHashSet(Table.builder().withName("table1").withCompactionStrategy(STCS).build()));
  clusterRepairAuto.scheduleRepairs(cluster);
  assertThat(context.storage.getAllRepairSchedules()).hasSize(2);
  assertThatClusterRepairSchedules(context.storage.getRepairSchedulesForCluster(cluster.getName()))
      .hasScheduleCount(2)
      .repairScheduleForKeyspace("keyspace1")
      .hasSameConfigItemsAs(context.config)
      .hasOwner("auto-scheduling")
      .hasNextActivationDateCloseTo(timeOfFirstSchedule())
      .andThen()
      .repairScheduleForKeyspace("keyspace3")
      .hasSameConfigItemsAs(context.config)
      .hasOwner("auto-scheduling")
      .hasNextActivationDateCloseTo(timeOfFirstSchedule());
}