public byte[] getTelemetryBytes(Beacon beacon) {
        if (beacon.getExtraDataFields().size() >= 5) {
            Beacon telemetryBeacon = new Beacon.Builder()
                    .setDataFields(beacon.getExtraDataFields())
                    .build();
            BeaconParser telemetryParser = new BeaconParser()
                    .setBeaconLayout(BeaconParser.EDDYSTONE_TLM_LAYOUT);
            byte[] telemetryBytes = telemetryParser.getBeaconAdvertisementData(telemetryBeacon);
            Log.d(TAG, "Rehydrated telemetry bytes are :" + byteArrayToString(telemetryBytes));
            return telemetryBytes;
        }
        else {
            return null;
        }
    }
@Test
    public void testAllowsAccessToTelemetryBytes() throws MalformedURLException {
        ArrayList<Long> telemetryFields = new ArrayList<Long>();
        telemetryFields.add(0x01l); // version
        telemetryFields.add(0x0212l); // battery level
        telemetryFields.add(0x0313l); // temperature
        telemetryFields.add(0x04142434l); // pdu count
        telemetryFields.add(0x05152535l); // uptime

        Beacon beaconWithTelemetry = new Beacon.Builder().setId1("0x0102030405060708090a").setId2("0x01020304050607").setTxPower(-59).setExtraDataFields(telemetryFields).build();
        byte[] telemetryBytes = new EddystoneTelemetryAccessor().getTelemetryBytes(beaconWithTelemetry);

        byte[] expectedBytes = {0x20, 0x01, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x24, 0x34, 0x05, 0x15, 0x25, 0x35};
        assertEquals(byteArrayToHexString(telemetryBytes), byteArrayToHexString(expectedBytes));
    }