@Test(timeout=30000)
public void testFailedLocationsBelowThreshold() throws Exception {

  final List<StorageLocation> locations =
      makeMockLocations(HEALTHY, HEALTHY, FAILED); // 2 healthy, 1 failed.
  final Configuration conf = new HdfsConfiguration();
  conf.setInt(DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, 1);
  StorageLocationChecker checker =
      new StorageLocationChecker(conf, new FakeTimer());
  List<StorageLocation> filteredLocations = checker.check(conf, locations);
  assertThat(filteredLocations.size(), is(2));
}