Add some convert methods for testing

Signed-off-by: Antti-Ville Jokela <jokela.anttiville@gmail.com>