@Test(expected = ODataBadRequestException.class) public void testWriteEntitySet() throws Exception { EntityDataModel entityDataModel = getEntityDataModel(); stubForTesting(getEntity(), entityDataModel); getPutMethodHandler(entityDataModel, true).handleWrite(getEntity()); }
@Override public ProcessorResult handleWrite(Object entity) throws ODataException { if (entity instanceof ODataLink) { return processLink((ODataLink) entity); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); } return processEntity(entity); } }
PutMethodHandler extends WriteMethodHandler { @Override public ProcessorResult handleWrite(Object entity) throws ODataException { if (entity instanceof ODataLink) { return processLink((ODataLink) entity); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); } return processEntity(entity); } } }
PutMethodHandler extends WriteMethodHandler { @Override public ProcessorResult handleWrite(Object entity) throws ODataException { if (entity instanceof ODataLink) { return processLink((ODataLink) entity); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); } return processEntity(entity); } } PutMethodHandler(ODataRequestContext requestContext, DataSourceFactory dataSourceFactory); }
PutMethodHandler extends WriteMethodHandler { @Override public ProcessorResult handleWrite(Object entity) throws ODataException { if (entity instanceof ODataLink) { return processLink((ODataLink) entity); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); } return processEntity(entity); } } PutMethodHandler(ODataRequestContext requestContext, DataSourceFactory dataSourceFactory); @Override ProcessorResult handleWrite(Object entity); }
PutMethodHandler extends WriteMethodHandler { @Override public ProcessorResult handleWrite(Object entity) throws ODataException { if (entity instanceof ODataLink) { return processLink((ODataLink) entity); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); } return processEntity(entity); } } PutMethodHandler(ODataRequestContext requestContext, DataSourceFactory dataSourceFactory); @Override ProcessorResult handleWrite(Object entity);  }