    @Test
    public void decode() throws Exception {

        for (Map.Entry<String, byte[]> entry : valid.entrySet()) {
            assertEquals(entry.getKey(), EddystoneURL.decode(entry.getValue()));
        }

        for (Map.Entry<String, byte[]> entry : unexpanded.entrySet()) {
            assertEquals(entry.getKey(), EddystoneURL.decode(entry.getValue()));
        }

        for (byte[] bytes : undecodable) {
            assertEquals(null, EddystoneURL.decode(bytes));
        }
    }