public static int hash(Object o) {
        if (o == null) {
            return 0;
        }
        if (o instanceof Long) {
            return hashLong((Long) o);
        }
        if (o instanceof Integer) {
            return hashLong((Integer) o);
        }
        if (o instanceof Double) {
            return hashLong(Double.doubleToRawLongBits((Double) o));
        }
        if (o instanceof Float) {
            return hashLong(Float.floatToRawIntBits((Float) o));
        }
        if (o instanceof String) {
            return hash(((String) o).getBytes());
        }
        if (o instanceof byte[]) {
            return hash((byte[]) o);
        }
        return hash(o.toString());
    }
@Test
    public void testHashByteArrayOverload() {
        String input = "hashthis";
        byte[] inputBytes = input.getBytes();

        int hashOfString = MurmurHash.hash(input);
        assertEquals("MurmurHash.hash(byte[]) did not match MurmurHash.hash(String)",
                     hashOfString, MurmurHash.hash(inputBytes));

        Object bytesAsObject = inputBytes;
        assertEquals("MurmurHash.hash(Object) given a byte[] did not match MurmurHash.hash(String)",
                     hashOfString, MurmurHash.hash(bytesAsObject));
    }