@Test
    public void createEntityDataWrapper() {
        Listener listener = new Listener();
        simpleEntityManager.addEntityEventListener(listener);

        ComponentData sampleComponentData = new ComponentData() {
            @Override
            public Class<? extends Component> getComponentClass() {
                return SampleComponent.class;
            }

            @Override
            public Map<String, Object> getFields() {
                return Collections.singletonMap("value", "a");
            }
        };

        EntityData data = new EntityData() {
            @Override
            public ComponentData getComponent(Class<? extends Component> componentClass) {
                if (componentClass == SampleComponent.class)
                    return sampleComponentData;
                return null;
            }

            @Override
            public Iterable<? extends ComponentData> getComponents() {
                return Collections.singleton(sampleComponentData);
            }
        };

        EntityRef result = simpleEntityManager.wrapEntityData(data);

        assertEquals(0, listener.events.size());

        assertEquals("a", result.getComponent(SampleComponent.class).getValue());
    }