@Test
public void testAddBlueprintForException() throws IOException {

  File file = new File("src/test/resources/testBlueprint.json");
  String json = IOUtils.toString(new FileInputStream(file));
  doThrow(responseException).when(ambariClient).addBlueprint(json);
  when(responseException.getMessage()).thenReturn("error");
  String result = blueprintCommands.addBlueprint("url", file);
  verify(ambariClient).addBlueprint(json);
  verify(responseException).getMessage();
  assertEquals("Cannot add blueprint: error", result);
}