@Test
public void successMigrateDocumentsCustomNodeGroupWithObserver() throws Throwable {

    // create object in host, using custom example factory tied to custom node group
    List<ExampleServiceState> states = createExampleDocuments(this.exampleWithCustomSelectorSourceFactory,
            getSourceHost(), this.serviceCount);
    // start migration. using custom node group destination, using default node group
    // and default example service as the source
    MigrationTaskService.State migrationState = validMigrationStateForCustomNodeGroup();
    Operation op = this.sender.sendAndWait(
            Operation.createPost(this.destinationFactoryUri).setBody(migrationState));
    String taskLink = op.getBody(State.class).documentSelfLink;
    State finalServiceState = waitForServiceCompletion(taskLink, getDestinationHost());
    assertEquals(TaskStage.FINISHED, finalServiceState.taskInfo.stage);
    // verify custom factory, on *observer* node, in custom group, has no children
    ServiceDocumentQueryResult res = getDestinationHost()
            .getFactoryState(this.exampleWithCustomSelectorDestinationFactoryOnObserver);
    assertEquals(0L, (long) res.documentCount);
    assertTrue(res.documentLinks.isEmpty());
    // verify custom factory on PEER node, in custom group, has all the children
    URI customExampleFactoryOnPeer = this.exampleWithCustomSelectorDestinationFactory;
    res = getDestinationHost().getFactoryState(customExampleFactoryOnPeer);
    assertEquals(states.size(), (long) res.documentCount);
    assertEquals(states.size(), res.documentLinks.size());
}