### Question:
TaskResourceProvider extends AbstractControllerResourceProvider { @Override public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException { throw new UnsupportedOperationException("Not currently supported."); } TaskResourceProvider(Set<String> propertyIds,
                       Map<Resource.Type, String> keyPropertyIds,
                       AmbariManagementController managementController); @Override RequestStatus createResources(Request request); @Override Set<Resource> getResources(Request request, Predicate predicate); @Override RequestStatus updateResources(Request request, Predicate predicate); @Override RequestStatus deleteResources(Request request, Predicate predicate); static final String TASK_CLUSTER_NAME_PROPERTY_ID; static final String TASK_REQUEST_ID_PROPERTY_ID; static final String TASK_ID_PROPERTY_ID; static final String TASK_STAGE_ID_PROPERTY_ID; static final String TASK_HOST_NAME_PROPERTY_ID; static final String TASK_ROLE_PROPERTY_ID; static final String TASK_COMMAND_PROPERTY_ID; static final String TASK_STATUS_PROPERTY_ID; static final String TASK_EXIT_CODE_PROPERTY_ID; static final String TASK_STDERR_PROPERTY_ID; static final String TASK_STOUT_PROPERTY_ID; static final String TASK_OUTPUTLOG_PROPERTY_ID; static final String TASK_ERRORLOG_PROPERTY_ID; static final String TASK_STRUCT_OUT_PROPERTY_ID; static final String TASK_START_TIME_PROPERTY_ID; static final String TASK_END_TIME_PROPERTY_ID; static final String TASK_ATTEMPT_CNT_PROPERTY_ID; static final String TASK_COMMAND_DET_PROPERTY_ID; static final String TASK_CUST_CMD_NAME_PROPERTY_ID; }### Answer:
@Test(expected = UnsupportedOperationException.class) public void testDeleteResources() throws Exception { Resource.Type type = Resource.Type.Task; AmbariManagementController managementController = createMock(AmbariManagementController.class); replay(managementController); ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider( type, PropertyHelper.getPropertyIds(type), PropertyHelper.getKeyPropertyIds(type), managementController); Predicate predicate = new PredicateBuilder().property(TaskResourceProvider.TASK_ID_PROPERTY_ID).equals("Task100").toPredicate(); provider.deleteResources(new RequestImpl(null, null, null, null), predicate); verify(managementController); }