@Test
public void checkCreateMessageByJsonFileMethod()
        throws Exception {

    FeaturesCreatorActor actor = new FeaturesCreatorActor();
    CreateMessageWrapper wrapper = mock(CreateMessageWrapper.class);
    when(wrapper.getFileName()).thenReturn("features.json");
    when(wrapper.getObservedDirectory()).thenReturn("target/test-classes/");
    doAnswer(invocationOnMock -> {
        try {
            IObject featureDescription = (IObject) ((List) invocationOnMock.getArguments()[0]).get(0);
            assertEquals(featureDescription.getValue(new FieldName("name")), "feature1");
            assertEquals(featureDescription.getValue(new FieldName("version")), "0.0.0");
            assertEquals(featureDescription.getValue(new FieldName("group")), "info.smart_tools.smartactors");
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
        return null;
    }).when(wrapper).setJsonFeaturesDescription(any());
    doAnswer(invocationOnMock -> {
        try {
            IObject featureDescription = (IObject) ((List) invocationOnMock.getArguments()[0]).get(0);
            assertEquals(featureDescription.getValue(new FieldName("repositoryId")), "repository1");
            assertEquals(featureDescription.getValue(new FieldName("type")), "default");
            assertEquals(featureDescription.getValue(new FieldName("url")), "info.smart_tools.smartactors");
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
        return null;
    }).when(wrapper).setJsonRepositoriesDescription(any());
    actor.createMessageByFile(wrapper);
    actor.createMessageByFile(wrapper);
}