### Question:
RX64Packet extends XBeeAPIPacket { @Override public boolean isBroadcast() { return ByteUtils.isBitEnabled(getReceiveOptions(), 1) || ByteUtils.isBitEnabled(getReceiveOptions(), 2); } RX64Packet(XBee64BitAddress sourceAddress64, int rssi, int receiveOptions, byte[] rfData); static RX64Packet createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); XBee64BitAddress get64bitSourceAddress(); int getRSSI(); int getReceiveOptions(); void setRFData(byte[] rfData); byte[] getRFData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testIsBroadcastWithNonBroadcastOption() { XBee64BitAddress source64Addr = new XBee64BitAddress("0013A2004032D9AB"); int rssi = 75; int options = 0x18; byte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61}; RX64Packet packet = new RX64Packet(source64Addr, rssi, options, receivedData); assertThat("Packet should not be broadcast", packet.isBroadcast(), is(equalTo(false))); }
@Test public final void testIsBroadcastWithBroadcastOptionBit1Enabled() { XBee64BitAddress source64Addr = new XBee64BitAddress("0013A2004032D9AB"); int rssi = 75; int options = 0xA2; byte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61}; RX64Packet packet = new RX64Packet(source64Addr, rssi, options, receivedData); assertThat("Packet should be broadcast", packet.isBroadcast(), is(equalTo(true))); }
@Test public final void testIsBroadcastWithBroadcastOptionBit2Enabled() { XBee64BitAddress source64Addr = new XBee64BitAddress("0013A2004032D9AB"); int rssi = 75; int options = 0xCC; byte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61}; RX64Packet packet = new RX64Packet(source64Addr, rssi, options, receivedData); assertThat("Packet should be broadcast", packet.isBroadcast(), is(equalTo(true))); }