    @Test
    public void secondaryFileRemoved()
            throws TransformException, InterruptedException, IOException {

        // create a stream and add it to the pipeline
        File jarFile = new File("jar file");
        TransformStream projectClass = OriginalStream.builder()
                .addContentType(DefaultContentType.CLASSES)
                .addScope(Scope.PROJECT)
                .setJar(jarFile)
                .setDependency("my dependency")
                .build();
        transformManager.addStream(projectClass);

        // create the transform, with a 2ndary file.
        File secondaryFile = new File("secondary file");
        TestTransform t = TestTransform.builder()
                .setIncremental(true)
                .setInputTypes(DefaultContentType.CLASSES)
                .setScopes(Scope.PROJECT)
                .setSecondaryFile(secondaryFile)
                .build();

        // add the transform to the manager
        AndroidTask<TransformTask> task = transformManager.addTransform(
                taskFactory, scope, t);
        // and get the real gradle task object
        TransformTask transformTask = (TransformTask) taskFactory.named(task.getName());
        assertThat(transformTask).isNotNull();

        // get the current output Stream in the transform manager.
        List<TransformStream> streams = transformManager.getStreams();
        assertThat(streams).hasSize(1);

        // call the task with incremental data
        // including a normal, in stream changed file
        transformTask.transform(inputBuilder()
                .incremental()
                .addedFile(jarFile)
                .removedFile(secondaryFile)
                .build());

        // check that was passed to the transform. Incremental should be off due
        // to secondary file
        assertThat(t.isIncrementalInputs()).isFalse();

        // checks on the inputs are done in the "secondary file added" tests
    }