hunk.code_window: 		if err != nil {
   			result.Err = model.NewLocAppError("SqlPostStore.GetPostsSince", "store.sql_post.get_posts_since.app_error", nil, "channelId="+channelId+err.Error())
   		} else {
   			list := &model.PostList{Order: make([]string, 0, len(posts))}
   			list.MakeNonNil()
   			var latestUpdate int64 = 0
   			for _, p := range posts {
  
hunk.labels: keep keep keep keep keep replace replace replace keep keep keep keep
hunk.after_edit: 			list := model.NewPostList()
  
hunk.file_path: store/sql_post_store.go
hunk.type: replace
file: // Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
  // See License.txt for license information.
  
  package model
  
  import (
  	"strings"
  	"testing"
  )
  
  func TestReactionIsValid(t *testing.T) {
  	reaction := Reaction{
  		UserId:    NewId(),
  		PostId:    NewId(),
  		EmojiName: "emoji",
  		CreateAt:  GetMillis(),
  	}
  
  	if err := reaction.IsValid(); err != nil {
  		t.Fatal(err)
  	}
  
  	reaction.UserId = ""
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("user id should be invalid")
  	}
  
  	reaction.UserId = "1234garbage"
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("user id should be invalid")
  	}
  
  	reaction.UserId = NewId()
  	reaction.PostId = ""
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("post id should be invalid")
  	}
  
  	reaction.PostId = "1234garbage"
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("post id should be invalid")
  	}
  
  	reaction.PostId = NewId()
  	reaction.EmojiName = ""
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("emoji name should be invalid")
  	}
  
  	reaction.EmojiName = strings.Repeat("a", 65)
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("emoji name should be invalid")
  	}
  
  	reaction.EmojiName = strings.Repeat("a", 64)
  	if err := reaction.IsValid(); err != nil {
  		t.Fatal(err)
  	}
  
  	reaction.CreateAt = 0
  	if err := reaction.IsValid(); err == nil {
  		t.Fatal("create at should be invalid")
  	}
  }
  