### Question:
ProcessDefinitionDesignResource extends CommonResource { @Get("json") public String getDesign() throws ProcessDefinitionNotFoundException, IOException { final DesignProcessDefinition design = processAPI.getDesignProcessDefinition(getProcessDefinitionIdParameter()); final JacksonRepresentation<DesignProcessDefinition> jacksonRepresentation = new JacksonRepresentation<DesignProcessDefinition>(design); jacksonRepresentation.getObjectMapper().configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); jacksonRepresentation.setCharacterSet(CharacterSet.UTF_8); return replaceLongIdToString(jacksonRepresentation.getText()); } ProcessDefinitionDesignResource(final ProcessAPI processAPI); @Get("json") String getDesign();  }### Answer:
@Test(expected = APIException.class) public void should_throw_exception_if_attribute_is_not_found() throws Exception { doReturn(null).when(processDefinitionDesignResource).getAttribute(anyString()); processDefinitionDesignResource.getDesign(); }