private void checkDeviceUsingTemplate(
      ISchemaTree schemaTree, int templateId, Set<String> expected) {
    List<PartialPath> deviceUsingTemplate = schemaTree.getDeviceUsingTemplate(templateId);
    Assert.assertEquals(expected.size(), deviceUsingTemplate.size());
    for (PartialPath d : deviceUsingTemplate) {
      Assert.assertTrue(expected.contains(d.getFullPath()));
      expected.remove(d.getFullPath());
    }
    Assert.assertTrue(expected.isEmpty());
  }
Generate the following tree: root.sg.d1.s1, root.sg.d1.s2(status) root.sg.d2.s1,
root.sg.d2.s2(status) root.sg.d2.a.s1, root.sg.d2.a.s2(status)
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTreeTest.java