You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: build_java_test.go
    path of file: ./repos/gaia/workers/pipeline
    
    the code of the file until where you have to start completion: package pipeline

import (
	"bytes"
	"io/ioutil"
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"
	"testing"

	"github.com/gaia-pipeline/gaia/helper/pipelinehelper"

	"github.com/gaia-pipeline/gaia"
	"github.com/gaia-pipeline/gaia/services"
	"github.com/gaia-pipeline/gaia/store"
	hclog "github.com/hashicorp/go-hclog"
)

func TestPrepareEnvironmentJava(t *testing.T) {
	tmp, _ := ioutil.TempDir("", "TestPrepareEnvironmentJava")
	ga
    
func TestSavePipelineJava(t *testing.T) {
	tmp, _ := ioutil.TempDir("", "TestSavePipelineJava")
	gaia.Cfg = new(gaia.Config)
	gaia.Cfg.HomePath = tmp
	m := new(javaMockStorer)
	services.MockStorageService(m)
	defer os.Remove(tmp)
	defer os.Remove("gaia.db")
	gaia.Cfg.PipelinePath = tmp + "/pipelines/"
	defer os.Remove(gaia.Cfg.PipelinePath)
	p := new(gaia.Pipeline)
	p.Name = "main"
	p.Type = gaia.PTypeJava
	b := new(BuildPipelineJava)
	err := b.SavePipeline(p)
	if err != nil {
		t.Fatal("something went wrong. wasn't supposed to get error: ", err)
	}
	if p.Name != "main" {
		t.Fatal("name of pipeline didn't equal expected 'main'. was instead: ", p.Name)
	}
	if p.Type != gaia.PTypeJava {
		t.Fatal("type of pipeline was not java. instead was: ", p.Type)
	}
}