### Question:
ProcessContractResource extends CommonResource { @Get("json") public ContractDefinition getContract() throws ProcessDefinitionNotFoundException { ContractDefinition processContract = processAPI.getProcessContract(getProcessDefinitionIdParameter()); return typeConverterUtil.getAdaptedContractDefinition(processContract); } ProcessContractResource(final ProcessAPI processAPI); @Get("json") ContractDefinition getContract();  }### Answer:
@Test(expected = APIException.class) public void should_throw_exception_if_attribute_is_not_found() throws Exception { doReturn(null).when(processContractResource).getAttribute(anyString()); processContractResource.getContract(); }