@Test
public void testToCompositeData() throws Exception {

    BundleEvent event = mock(BundleEvent.class);
    Bundle bundle = mock(Bundle.class);
    when(event.getBundle()).thenReturn(bundle);
    when(bundle.getSymbolicName()).thenReturn("test");
    when(bundle.getBundleId()).thenReturn(new Long(4));
    when(bundle.getLocation()).thenReturn("location");
    when(event.getType()).thenReturn(BundleEvent.INSTALLED);
    
    BundleEventData eventData = new BundleEventData(event);
    CompositeData eventCompositeData = eventData.toCompositeData();
    
    assertEquals(new Long(4), (Long) eventCompositeData.get(IDENTIFIER));
    assertEquals("test", (String) eventCompositeData.get(SYMBOLIC_NAME));
    assertEquals(new Integer(BundleEvent.INSTALLED),  (Integer) eventCompositeData.get(EVENT));
    assertEquals("location",  (String) eventCompositeData.get(LOCATION));
    
}