Can I test this on truffle? If yes, how?

Which version of Blockcerts are you attempting to use? Did you see: Issue Blockcerts on Ethereum [under development] ?