}
if (-1==sampleBundleId) fail("Blueprint Sample Bundle is not found!");
if (-1==extenderBundleId) fail("Blueprint Extender Bundle is not found!");
//retrieve the proxy object
BlueprintStateMBean stateProxy = MBeanServerInvocationHandler.newProxyInstance(mbeanServer, new ObjectName(BlueprintStateMBean.OBJECTNAME), BlueprintStateMBean.class, false);
// test getBlueprintBundleIds
long[] bpBundleIds = stateProxy.getBlueprintBundleIds();
assertEquals("The blueprint bundle ids are: " + Arrays.toString(bpBundleIds), 3, bpBundleIds.length);
// test getLastEvent
BlueprintEventValidator sampleValidator = new BlueprintEventValidator(sampleBundleId, extenderBundleId, 2);
sampleValidator.validate(stateProxy.getLastEvent(sampleBundleId));
// test getLastEvents
TabularData lastEvents = stateProxy.getLastEvents();
assertEquals(BlueprintStateMBean.OSGI_BLUEPRINT_EVENTS_TYPE,lastEvents.getTabularType());
sampleValidator.validate(lastEvents.get(new Long[]{sampleBundleId}));
//////////////////////////////
//Test BlueprintMetadataMBean