Added unittests for testnet support