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