func TestInitialBits(t *testing.T) {
	nonces := []blockrecord.NonceType{
		0x1234567890abcdef,
		0x1234567890abcdef,
		0x1234567890abcdef,
	}
	for i, expected := range nonces {
		buffer, err := json.Marshal(expected)
		if nil != err {
			t.Fatalf("%d: JSON encode error: %s", i, err)
		}
		var actual blockrecord.NonceType
		err = json.Unmarshal(buffer, &actual)
		if nil != err {
			t.Fatalf("%d: JSON decode error: %s", i, err)
		}
		if actual != expected {
			t.Errorf("%d: JSON actual: %016x  expected: %016x", i, actual, expected)
		}
	}
}
test JSON conversion
package blockrecord_test
import (
	"encoding/json"
	"testing"
	"github.com/bitmark-inc/bitmarkd/blockrecord"
)