@Test(expected = ChefUtil.InvalidChefRequest.class) public void testClientBadArgs() throws Exception { String oldClientId = chefUtil.getChefClientId(); try { chefUtil.setChefClientId("some-bad-garbage-id"); String json = ChefUtil.createClient(name2); logger.debug("Got response:" + json); json = ChefUtil.getClient(name2); logger.debug("Got response:" + json); } finally { chefUtil.setChefClientId(oldClientId); } }