ExternalBuildGlobalScope implements TransformGlobalScope { @Override public boolean isActive(OptionalCompilationStep step) { return optionalCompilationSteps.contains(step); } ExternalBuildGlobalScope(Project project); @Override Project getProject(); @NonNull @Override File getBuildDir(); @Override boolean isActive(OptionalCompilationStep step);  }
@Test public void testIsActive() { when(project.hasProperty(AndroidProject.PROPERTY_OPTIONAL_COMPILATION_STEPS)).thenReturn(true); when(project.property(AndroidProject.PROPERTY_OPTIONAL_COMPILATION_STEPS)).thenReturn("INSTANT_DEV"); scope = new ExternalBuildGlobalScope(project); assertThat(scope.isActive(OptionalCompilationStep.INSTANT_DEV)).isTrue(); assertThat(scope.isActive(OptionalCompilationStep.LOCAL_JAVA_ONLY)).isFalse(); }