@Test public void testPUTWithIdInURL() throws PersistenceException { request.setId(URL_ID); SimpleObject simpleObject = new SimpleObject(); request.setDataObject(simpleObject); doReturn(true).when(mockVisibilityFilter).isVisible(any(), any()); doReturn(simpleObject).when(mockObjectPersister).retrieve(anyString()); DataObjectResponse<SimpleObject> response = processor.handlePUT(request); Assert.assertEquals(simpleObject.getId(), URL_ID); Assert.assertFalse(response.isError()); }
@Override public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request) { return handlePUT(request, null); }
DataObjectRequestProcessor implements RequestProcessor<DataObjectResponse<T>, DataObjectRequest<T>> { @Override public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request) { return handlePUT(request, null); } }
DataObjectRequestProcessor implements RequestProcessor<DataObjectResponse<T>, DataObjectRequest<T>> { @Override public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request) { return handlePUT(request, null); } DataObjectRequestProcessor(ObjectPersister<T> objectPersister, DataObjectValidator<T, DataObjectRequest<T>> validator);  DataObjectRequestProcessor(ObjectPersister<T> objectPersister); }
DataObjectRequestProcessor implements RequestProcessor<DataObjectResponse<T>, DataObjectRequest<T>> { @Override public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request) { return handlePUT(request, null); } DataObjectRequestProcessor(ObjectPersister<T> objectPersister, DataObjectValidator<T, DataObjectRequest<T>> validator);  DataObjectRequestProcessor(ObjectPersister<T> objectPersister); @Override DataObjectResponse<T> handleGET(DataObjectRequest<T> request); @Override DataObjectResponse<T> handlePOST(DataObjectRequest<T> request); @Override DataObjectResponse<T> handlePUT(DataObjectRequest<T> request); DataObjectResponse<T> handlePUT(DataObjectRequest<T> request, T previouslyRetrievedObject); @Override DataObjectResponse<T> handleDELETE(DataObjectRequest<T> request); DataObjectRequestProcessor<T> setVisibilityFilterMap(
        VisibilityFilterMap<T, DataObjectRequest<T>> map); DataObjectRequestProcessor<T> setVisibilityFilter(VisibilityMethod method,
        VisibilityFilter<T, DataObjectRequest<T>> filter); RequestValidator<DataObjectRequest<T>> getRequestValidator(); void setRequestValidator(RequestValidator<DataObjectRequest<T>> requestValidator); ObjectPersister<T> getObjectPersister(); }
DataObjectRequestProcessor implements RequestProcessor<DataObjectResponse<T>, DataObjectRequest<T>> { @Override public DataObjectResponse<T> handlePUT(DataObjectRequest<T> request) { return handlePUT(request, null); } DataObjectRequestProcessor(ObjectPersister<T> objectPersister, DataObjectValidator<T, DataObjectRequest<T>> validator);  DataObjectRequestProcessor(ObjectPersister<T> objectPersister); @Override DataObjectResponse<T> handleGET(DataObjectRequest<T> request); @Override DataObjectResponse<T> handlePOST(DataObjectRequest<T> request); @Override DataObjectResponse<T> handlePUT(DataObjectRequest<T> request); DataObjectResponse<T> handlePUT(DataObjectRequest<T> request, T previouslyRetrievedObject); @Override DataObjectResponse<T> handleDELETE(DataObjectRequest<T> request); DataObjectRequestProcessor<T> setVisibilityFilterMap(
        VisibilityFilterMap<T, DataObjectRequest<T>> map); DataObjectRequestProcessor<T> setVisibilityFilter(VisibilityMethod method,
        VisibilityFilter<T, DataObjectRequest<T>> filter); RequestValidator<DataObjectRequest<T>> getRequestValidator(); void setRequestValidator(RequestValidator<DataObjectRequest<T>> requestValidator); ObjectPersister<T> getObjectPersister(); static final String OBJECT_NOT_FOUND_EXCEPTION; static final String AUTHORIZATION_EXCEPTION; static final String UNABLE_TO_CREATE_EXCEPTION; static final String UNABLE_TO_UPDATE_EXCEPTION; static final String UNABLE_TO_DELETE_EXCEPTION; }