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: redhatbase_test.go
    path of file: ./repos/vuls/scanner
    
    the code of the file until where you have to start completion: package scanner

import (
	"reflect"
	"testing"

	"github.com/future-architect/vuls/config"
	"github.com/future-architect/vuls/constant"
	"github.com/future-architect/vuls/models"
	"github.com/k0kubun/pp"
)

//  func unixtimeNoerr(s string) time.Time {
//      t, _ := unixtime(s)
//      return t
//  }

func TestParseInstalledPackagesLinesRedhat(t *testing.T) {
	r := newRHEL(config.ServerInfo{})

	var packagetests
    
func TestParseInstalledPackagesLineFromRepoquery(t *testing.T) {
	r := newRHEL(config.ServerInfo{})

	var packagetests = []struct {
		in   string
		pack models.Package
		err  bool
	}{
		{
			in: "yum-utils 0 1.1.31 46.amzn2.0.1 noarch @amzn2-core",
			pack: models.Package{
				Name:       "yum-utils",
				Version:    "1.1.31",
				Release:    "46.amzn2.0.1",
				Arch:       "noarch",
				Repository: "amzn2-core",
			},
		},
		{
			in: "zlib 0 1.2.7 19.amzn2.0.1 x86_64 installed",
			pack: models.Package{
				Name:       "zlib",
				Version:    "1.2.7",
				Release:    "19.amzn2.0.1",
				Arch:       "x86_64",
				Repository: "amzn2-core",
			},
		},
		{
			in: "java-1.8.0-amazon-corretto 1 1.8.0_192.b12 1.amzn2 x86_64 @amzn2extra-corretto8",
			pack: models.Package{
				Name:       "java-1.8.0-amazon-corretto",
				Version:    "1:1.8.0_192.b12",
				Release:    "1.amzn2",
				Arch:       "x86_64",
				Repository: "amzn2extra-corretto8",
			},
		},
	}

	for i, tt := range packagetests {
		p, err := r.parseInstalledPackagesLineFromRepoquery(tt.in)
		if err == nil && tt.err {
			t.Errorf("Expected err not occurred: %d", i)
		}
		if err != nil && !tt.err {
			t.Errorf("UnExpected err not occurred: %d", i)
		}
		if p.Name != tt.pack.Name {
			t.Errorf("name: expected %s, actual %s", tt.pack.Name, p.Name)
		}
		if p.Version != tt.pack.Version {
			t.Errorf("version: expected %s, actual %s", tt.pack.Version, p.Version)
		}
		if p.Release != tt.pack.Release {
			t.Errorf("release: expected %s, actual %s", tt.pack.Release, p.Release)
		}
		if p.Arch != tt.pack.Arch {
			t.Errorf("arch: expected %s, actual %s", tt.pack.Arch, p.Arch)
		}
		if p.Repository != tt.pack.Repository {
			t.Errorf("repository: expected %s, actual %s", tt.pack.Repository, p.Repository)
		}
	}

}