BeaconContent { public byte[] getDeviceMessage() { if (deviceMessage == null) { return null; } return deviceMessage.clone(); } @JsonCreator  BeaconContent(
            @JsonProperty("hwid") final String hwid,
            @JsonProperty("type") final String type,
            @JsonProperty("dm") final String deviceMessage); byte[] getDeviceMessage(); String getDeviceMessageAsHex(); @Override String toString();  }
@Test public void beaconContentArrayProtectedTest() { BeaconContent target = new BeaconContent("hwid", "enter", "01"); assertThat(target.getDeviceMessage()) .hasSize(1) .containsExactly(0x01); target.getDeviceMessage()[0] = (byte) 0xcd; assertThat(target.getDeviceMessage()[0]) .isEqualTo((byte) 0x01) .isNotEqualTo((byte) 0xcd); }