@Test
public void Should_createMessage()
        throws Exception {

    IEmbeddedSensorObservationPeriod esop = new EmbeddedSensorObservationPeriod<>(100, 200, 4, strategyMock);
    Collection res = mock(Collection.class);
    when(strategyMock.extractPeriod(same(states[0]))).thenReturn(res);
    IObject msg = esop.createMessage();
    assertEquals(100L, ((Long) msg.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "periodStart"))).longValue());
    assertEquals(200L, ((Long) msg.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "periodEnd"))).longValue());
    assertSame(res, msg.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "data")));
}