### Question:
FeatureSplitDeclarationWriterTask extends AndroidVariantTask { @TaskAction public void fullTaskAction() throws IOException { FeatureSplitDeclaration declaration = new FeatureSplitDeclaration(uniqueIdentifier, getApplicationId()); declaration.save(outputDirectory); }  @Input String getUniqueIdentifier(); @Input String getApplicationId(); @OutputDirectory File getOutputDirectory(); @TaskAction void fullTaskAction();  }### Answer:
@Test public void testTask() throws IOException { task.uniqueIdentifier = "unique_split"; task.originalApplicationIdSupplier = () -> null; task.fullTaskAction(); File[] files = outputDirectory.listFiles(); assertThat(files).hasLength(1); FeatureSplitDeclaration loadedDecl = FeatureSplitDeclaration.load(files[0]); assertThat("unique_split").isEqualTo(loadedDecl.getModulePath()); }