### Question:
Beacon { public P getOldestAdvertisingPacket() { synchronized (advertisingPackets) { if (!hasAnyAdvertisingPacket()) { return null; } return advertisingPackets.get(0); } } Beacon(); @Deprecated static Beacon from(AdvertisingPacket advertisingPacket); boolean hasLocation(); Location getLocation(); static List<Location> getLocations(List<? extends Beacon> beacons); abstract BeaconLocationProvider<? extends Beacon> createLocationProvider(); boolean hasAnyAdvertisingPacket(); P getOldestAdvertisingPacket(); P getLatestAdvertisingPacket(); ArrayList<P> getAdvertisingPacketsBetween(long startTimestamp, long endTimestamp); ArrayList<P> getAdvertisingPacketsFromLast(long amount, TimeUnit timeUnit); ArrayList<P> getAdvertisingPacketsSince(long timestamp); ArrayList<P> getAdvertisingPacketsBefore(long timestamp); void addAdvertisingPacket(P advertisingPacket); void applyPropertiesFromAdvertisingPacket(P advertisingPacket); void trimAdvertisingPackets(); boolean equalsLastAdvertisingPackage(P advertisingPacket); boolean hasBeenSeenSince(long timestamp); boolean hasBeenSeenInThePast(long duration, TimeUnit timeUnit); float getRssi(RssiFilter filter); float getFilteredRssi(); float getDistance(); float getDistance(RssiFilter filter); float getEstimatedAdvertisingRange(); long getLatestTimestamp(); WindowFilter createSuggestedWindowFilter(); @Override String toString(); String getMacAddress(); void setMacAddress(String macAddress); int getRssi(); void setRssi(int rssi); int getCalibratedRssi(); void setCalibratedRssi(int calibratedRssi); int getCalibratedDistance(); void setCalibratedDistance(int calibratedDistance); int getTransmissionPower(); void setTransmissionPower(int transmissionPower); ArrayList<P> getAdvertisingPackets(); LocationProvider getLocationProvider(); void setLocationProvider(BeaconLocationProvider<? extends Beacon> locationProvider); static final long MAXIMUM_PACKET_AGE; @Deprecated
    static Comparator<Beacon> RssiComparator; }### Answer:
@Test public void getOldestAdvertisingPacket() { assertEquals(iBeacon.getAdvertisingPackets().get(0), iBeacon.getOldestAdvertisingPacket()); }