@Override
    public void createDataStream(String dataStreamName, String timestampField, Map<String, Map<String, String>> mappings,
                                 Policy ismPolicy) {
        updateDataStreamTemplate(dataStreamName, timestampField, mappings);
        dataStreamAdapter.createDataStream(dataStreamName);
        dataStreamAdapter.applyIsmPolicy(dataStreamName, ismPolicy);
        dataStreamAdapter.setNumberOfReplicas(dataStreamName, replicas);
    }
@Test
    public void createDataStreamPerformsFunctions() {
        final String name = "teststream";
        final String ts = "ts";
        final Map<String, Map<String, String>> mappings = new HashMap<>();
        final Policy policy = mock(Policy.class);
        dataStreamService.createDataStream(name, ts, mappings, policy);
        verify(dataStreamAdapter).ensureDataStreamTemplate(eq(name + "-template"), any(), eq(ts));
        verify(indexFieldTypesService).upsert(any());
        verify(dataStreamAdapter).createDataStream(name);
        verify(dataStreamAdapter).applyIsmPolicy(name, policy);
        verify(dataStreamAdapter).setNumberOfReplicas(name, 0);
    }