Deleted extra method call of encode in Test