### Question:
Component implements Tickable { public final SerializableMap getData() { return getOwner().getData(); } Component(); @Override boolean canTick(); @Override final void tick(float dt); @Override void onTick(float dt); boolean attachTo(ComponentOwner owner); ComponentOwner getOwner(); void onAttached(); void onDetached(); boolean isDetachable(); final SerializableMap getData();  }### Answer:
@Test public void test() throws Exception { BaseComponentOwner base = new BaseComponentOwner(); TestEntity entity = new TestEntity(); TestWidget widget = new TestWidget(); TestWorld world = new TestWorld(); BlockComponentOwner block = new BlockComponentOwner(new ManagedHashMap(), 0, 0, 0, world); GenericSubComponent c1 = base.add(GenericSubComponent.class); GenericSubComponent2 c2 = base.add(GenericSubComponent2.class); OtherGenericComponent c3 = base.add(OtherGenericComponent.class); assertNotNull(base.getData()); assertNotNull(block.getData()); assertNotNull(entity.getData()); assertNotNull(widget.getData()); assertNotNull(world.getData()); GenericBlockComponent bc = block.add(GenericBlockComponent.class); assertNotNull(bc); GenericEntityComponent ec = entity.add(GenericEntityComponent.class); assertNotNull(ec); GenericWidgetComponent wic = widget.add(GenericWidgetComponent.class); assertNotNull(wic); GenericWorldComponent woc = world.add(GenericWorldComponent.class); assertNotNull(woc); assertNull(base.getExact(GenericComponent.class)); assertNull(base.get(GenericEntityComponent.class)); Collection<GenericComponent> generic = base.getAll(GenericComponent.class); assertTrue(generic.size() == 2); assertThat(generic, hasItems(c1, c2)); Collection<Component> components = base.values(); assertTrue(components.size() == 3); assertThat(components, hasItems(c1, c2, c3)); GenericComponentWithInterface cwi = base.add(GenericComponentWithInterface.class); Interface type = base.getType(Interface.class); assertNotNull(type); Collection<Interface> allOfType = base.getAllOfType(Interface.class); assertTrue(allOfType.size() == 1); assertEquals(cwi, type); }