private function getMockPrivateKey($hex = null)
{
$hex = $hex === null ? $this->hexKeys[0]['private'] : $hex;
$key = $this->getMock('Bitpay\\PrivateKey');
$key->method('isValid')->will($this->returnValue(true));
$key->method('getHex')->will($this->returnValue($hex));
return $key;
}