### Question:
BuildServiceHelper { public BuildResults localBuild(Module module) { final BuildResults[] result = new BuildResults[1]; invokeLocalBuildPipeLine(module, 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 testLocalBuild() { prepareLocalFullBuild(); when(localBinaryConfig.getBuildResults()).thenReturn(buildResults); BuildResults result = serviceHelper.localBuild(module); assertEquals(buildResults, result); verify(pipelineInvoker, times(1)).invokeLocalBuildPipeLine(eq(expectedRequest), any(Consumer.class)); }