### Question:
BuildServiceImpl implements BuildService { @Override public BuildResults buildAndDeploy(final Module module) { return buildAndDeploy(module, DeploymentMode.VALIDATED); } BuildServiceImpl(); @Inject  BuildServiceImpl(final KieModuleService moduleService,
                            final BuildServiceHelper buildServiceHelper,
                            final LRUBuilderCache cache); @Override BuildResults build(final Module module); void build(final Module module,
                      final Consumer<Builder> consumer); @Override BuildResults buildAndDeploy(final Module module); @Override BuildResults buildAndDeploy(final Module module,
                                       final DeploymentMode mode); @Override BuildResults buildAndDeploy(final Module module,
                                       final boolean suppressHandlers); @Override BuildResults buildAndDeploy(final Module module,
                                       final boolean suppressHandlers,
                                       final DeploymentMode mode); @Override boolean isBuilt(final Module module); @Override IncrementalBuildResults addPackageResource(final Path resource); @Override IncrementalBuildResults deletePackageResource(final Path resource); @Override IncrementalBuildResults updatePackageResource(final Path resource); @Override IncrementalBuildResults applyBatchResourceChanges(final Module module,
                                                             final Map<Path, Collection<ResourceChange>> changes);  }### Answer:
@Test public void testBuildAndDeploy() { prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false); BuildResults result = buildService.buildAndDeploy(module); assertEquals(buildResults, result); verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false); }
@Test public void testBuildAndDeployWithDeploymentMode() { prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false); BuildResults result = buildService.buildAndDeploy(module, DeploymentMode.VALIDATED); assertEquals(buildResults, result); verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false); }
@Test public void testBuildAndDeployWithSuppressHandlers() { prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false); BuildResults result = buildService.buildAndDeploy(module, false); assertEquals(buildResults, result); verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false); }
@Test public void testBuildAndDeployWithDeploymentModeAndSuppressHandlers() { prepareBuildAndDeploy(module, DeploymentMode.VALIDATED, false); BuildResults result = buildService.buildAndDeploy(module, false, DeploymentMode.VALIDATED); assertEquals(buildResults, result); verifyBuildAndDeploy(module, DeploymentMode.VALIDATED, false); }