Add tests for certificate
Support to take a certifivate

Close #6