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

  final List<StorageLocation> locations =
      makeMockLocations(HEALTHY, HEALTHY, HEALTHY);
  final Configuration conf = new HdfsConfiguration();
  conf.setInt(DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, 3);
  thrown.expect(HadoopIllegalArgumentException.class);
  thrown.expectMessage("Invalid value configured");
  StorageLocationChecker checker =
      new StorageLocationChecker(conf, new FakeTimer());
  checker.check(conf, locations);
}