### Question:
BuildServiceHelper { public BuildResults localBuildAndDeploy(final Module module, final DeploymentMode mode, final boolean suppressHandlers) { final BuildResults[] result = new BuildResults[1]; invokeLocalBuildPipeLine(module, suppressHandlers, mode, localBinaryConfig -> { result[0] = localBinaryConfig.getBuildResults(); }); return result[0]; } BuildServiceHelper(); @Inject  BuildServiceHelper(BuildPipelineInvoker buildPipelineInvoker,
                              DeploymentVerifier deploymentVerifier); BuildResults localBuild(Module module); void localBuild(Module module,
                           Consumer<LocalBinaryConfig> consumer); IncrementalBuildResults localBuild(Module module,
                                              LocalBuildConfig.BuildType buildType,
                                              Path resource); IncrementalBuildResults localBuild(Module module,
                                              Map<Path, Collection<ResourceChange>> resourceChanges); BuildResults localBuildAndDeploy(final Module module,
                                            final DeploymentMode mode,
                                            final boolean suppressHandlers);  }### Answer:
@Test public void testLocalBuildAndDeployForced() { prepareBuildAndDeploy(module, LocalBuildConfig.DeploymentType.FORCED, false); BuildResults result = serviceHelper.localBuildAndDeploy(module, DeploymentMode.FORCED, false); verifyBuildAndDeploy(result); }
@Test public void testLocalBuildAndDeployValidated() { prepareBuildAndDeploy(module, LocalBuildConfig.DeploymentType.VALIDATED, false); BuildResults result = serviceHelper.localBuildAndDeploy(module, DeploymentMode.VALIDATED, false); verifyBuildAndDeploy(result); }