ImmutableTree extends AbstractTree implements TreeTypeAware, ReadOnly { public void setType(@NotNull TreeType type) { this.type = type; } ImmutableTree(@NotNull NodeState rootState);  ImmutableTree(@NotNull ImmutableTree parent, @NotNull String name, @NotNull NodeState state);  ImmutableTree(@NotNull ParentProvider parentProvider, @NotNull String name, @NotNull NodeState state); @Nullable TreeType getType(); void setType(@NotNull TreeType type); @Override boolean isRoot(); @NotNull @Override String getName(); @Override @NotNull String getPath(); @NotNull @Override ImmutableTree getChild(@NotNull String name); @Override boolean remove(); @Override @NotNull Tree addChild(@NotNull String name); @Override void setOrderableChildren(boolean enable); @Override boolean orderBefore(@Nullable String name); @Override void setProperty(@NotNull PropertyState property); @Override void setProperty(@NotNull String name, @NotNull T value); @Override void setProperty(@NotNull String name, @NotNull T value, @NotNull Type<T> type); @Override void removeProperty(@NotNull String name); @Override int hashCode(); @Override boolean equals(Object o);  }
@Test public void testSetType() { assertNull(immutable.getType()); immutable.setType(TreeType.VERSION); assertSame(TreeType.VERSION, immutable.getType()); immutable.setType(TreeType.DEFAULT); assertSame(TreeType.DEFAULT, immutable.getType()); }