public void moveModel(int fromPosition, int toPosition) {
    assertNotBuildingModels();

    adapter.moveModel(fromPosition, toPosition);

    requestDelayedModelBuild(500);
  }
@Test
  public void moveModel() {
    AdapterDataObserver observer = mock(AdapterDataObserver.class);
    final List<TestModel> testModels = new ArrayList<>();
    testModels.add(new TestModel(1));
    testModels.add(new TestModel(2));
    testModels.add(new TestModel(3));

    EpoxyController controller = new EpoxyController() {

      @Override
      protected void buildModels() {
        add(testModels);
      }
    };

    EpoxyControllerAdapter adapter = controller.getAdapter();
    adapter.registerAdapterDataObserver(observer);
    controller.requestModelBuild();

    verify(observer).onItemRangeInserted(0, 3);

    testModels.add(0, testModels.remove(1));

    controller.moveModel(1, 0);
    verify(observer).onItemRangeMoved(1, 0, 1);

    assertEquals(testModels, adapter.getCurrentModels());

    controller.requestModelBuild();
    assertEquals(testModels, adapter.getCurrentModels());
    verifyNoMoreInteractions(observer);
  }