@Test(expectedExceptions = RuntimeException.class)
public void testValidateTonyConfTooManyFooInstances() {

  Configuration conf = new Configuration();
  conf.setInt(TonyConfigurationKeys.getMaxInstancesKey("foo"), 1);
  conf.setInt("tony.foo.instances", 2);
  TonyClient.validateTonyConf(conf);
}