### Question:
BazelCleanTask extends BazelExecTaskBase { @Override public void setBazelConfig(BazelLeafConfig.Decorated config) { super.setBazelConfig(config); setDescription("Cleans Bazel workspace"); setGroup(BasePlugin.BUILD_GROUP); } @Inject  BazelCleanTask(); @VisibleForTesting  BazelCleanTask(BazelExecHelper bazelExecHelper); @Override void setBazelConfig(BazelLeafConfig.Decorated config);  }### Answer:
@Test public void testTask() throws Exception { Project project = TestUtils.createConfiguredAppliedProject(); TestableBazelCleanTask bazelClean = project.getTasks().create("bazelClean", TestableBazelCleanTask.class); BazelLeafConfig.Decorated config = new BazelLeafConfig.Decorated( "bazelBin", "targetPath", "targetName", "testTargetName", new File("workspaceDir"), "outputDir" ); bazelClean.setBazelConfig(config); bazelClean.bazelExec(); verify(bazelClean.getMockBazelExecHelper()).createBazelRun(true, config, "", "clean"); verify(bazelClean.mockBazelExec).start(); assertThat(bazelClean.getDescription(), IsEqual .equalTo("Cleans Bazel workspace")); assertThat(bazelClean.getGroup(), IsEqual.equalTo(BasePlugin.BUILD_GROUP)); }