use of org.apache.sling.ide.impl.vlt.ReorderChildNodesCommand in project sling by apache.
the class DefaultBatcherTest method identicalsReorderingsAreCompacted.
@Test
public void identicalsReorderingsAreCompacted() {
ReorderChildNodesCommand first = new ReorderChildNodesCommand(mockRepo, credentials, new ResourceProxy("/content"), null);
ReorderChildNodesCommand second = new ReorderChildNodesCommand(mockRepo, credentials, new ResourceProxy("/content"), null);
batcher.add(first);
batcher.add(second);
List<Command<?>> batched = batcher.get();
assertThat(batched, hasSize(1));
Command<?> command = batched.get(0);
assertThat(command, instanceOf(ReorderChildNodesCommand.class));
assertThat(command.getPath(), equalTo("/content"));
}
Aggregations