ResourceContextException
{
m_resourceContext = new SushiResourceContext();
//build callback obj
SushiPlate plate = new SushiPlate();
SushiCallback callback = new SushiCallback( plate );
//check whats there
QueryResourcePropertiesResponseDocument.QueryResourcePropertiesResponse queryResourcePropertiesResponse =
queryResourceProperties( "*" );
XmlObject[] ebiPropElems =
XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
String value = XmlBeanUtils.getValue( ebiPropElems[0] );
assertEquals( "9", value );
//setup callback to modify resource prop
SushiResource resource = (SushiResource) m_resourceContext.getResource();
ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
resourceProp.setCallback( callback );
queryResourcePropertiesResponse = queryResourceProperties( "*" );
ebiPropElems = XmlBeanUtils.getChildElements( queryResourcePropertiesResponse, SushiPropertyQNames.EBI );
assertNotNull( ebiPropElems );
value = XmlBeanUtils.getValue( ebiPropElems[0] );
assertEquals( plate.getEbi().getNumberOfPieces(), value );
}