### Question:
RequestResourceProvider extends AbstractControllerResourceProvider { @Override public RequestStatus deleteResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException { throw new UnsupportedOperationException("Not currently supported."); } RequestResourceProvider(AmbariManagementController managementController); @Override RequestStatus createResources(Request request); @Override Set<Resource> getResources(Request request, Predicate predicate); @Override RequestStatus updateResources(Request requestInfo, Predicate predicate); @Override RequestStatus deleteResources(Request request, Predicate predicate); static final String REQUESTS; static final String REQUEST_INFO; static final String REQUEST_CLUSTER_NAME_PROPERTY_ID; static final String REQUEST_CLUSTER_ID_PROPERTY_ID; static final String REQUEST_ID_PROPERTY_ID; static final String REQUEST_STATUS_PROPERTY_ID; static final String REQUEST_ABORT_REASON_PROPERTY_ID; static final String REQUEST_CONTEXT_ID; static final String REQUEST_SOURCE_SCHEDULE; static final String REQUEST_SOURCE_SCHEDULE_ID; static final String REQUEST_SOURCE_SCHEDULE_HREF; static final String REQUEST_TYPE_ID; static final String REQUEST_INPUTS_ID; static final String REQUEST_CLUSTER_HOST_INFO_ID; static final String REQUEST_RESOURCE_FILTER_ID; static final String REQUEST_OPERATION_LEVEL_ID; static final String REQUEST_CREATE_TIME_ID; static final String REQUEST_START_TIME_ID; static final String REQUEST_END_TIME_ID; static final String REQUEST_EXCLUSIVE_ID; static final String REQUEST_TASK_CNT_ID; static final String REQUEST_FAILED_TASK_CNT_ID; static final String REQUEST_ABORTED_TASK_CNT_ID; static final String REQUEST_TIMED_OUT_TASK_CNT_ID; static final String REQUEST_COMPLETED_TASK_CNT_ID; static final String REQUEST_QUEUED_TASK_CNT_ID; static final String REQUEST_PROGRESS_PERCENT_ID; static final String REQUEST_REMOVE_PENDING_HOST_REQUESTS_ID; static final String REQUEST_PENDING_HOST_REQUEST_COUNT_ID; static final String REQUEST_USER_NAME; static final String COMMAND_ID; static final String SERVICE_ID; static final String COMPONENT_ID; static final String HOSTS_ID; static final String HOSTS_PREDICATE; static final String ACTION_ID; static final String INPUTS_ID; static final String EXCLUSIVE_ID; static final String HAS_RESOURCE_FILTERS; static final String CONTEXT; }### Answer:
@Test public void testDeleteResources() throws Exception { Resource.Type type = Resource.Type.Request; AmbariManagementController managementController = createMock(AmbariManagementController.class); replay(managementController); ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider( type, managementController); Predicate predicate = new PredicateBuilder().property(RequestResourceProvider.REQUEST_ID_PROPERTY_ID). equals("Request100").toPredicate(); try { provider.deleteResources(new RequestImpl(null, null, null, null), predicate); Assert.fail("Expected an UnsupportedOperationException"); } catch (UnsupportedOperationException e) { } verify(managementController); }