### Question:
PhysicalWebCollection { public PwsResult getMetadataByBroadcastUrl(String broadcastUrl) { return mBroadcastUrlToPwsResultMap.get(broadcastUrl); } PhysicalWebCollection(); boolean addUrlDevice(UrlDevice urlDevice); void removeUrlDevice(UrlDevice urlDevice); void addMetadata(PwsResult pwsResult); void addIcon(String url, byte[] icon); void clear(); byte[] getIcon(String url); UrlDevice getUrlDeviceById(String id); PwsResult getMetadataByBroadcastUrl(String broadcastUrl); List<UrlDevice> getUrlDevices(); JSONObject jsonSerialize(); static PhysicalWebCollection jsonDeserialize(JSONObject jsonObject); List<PwPair> getPwPairsSortedByRank(Comparator<PwPair> comparator); List<PwPair> getGroupedPwPairsSortedByRank(Comparator<PwPair> comparator); List<PwPair> getPwPairs(); PwPair getTopRankedPwPairByGroupId(String groupId, Comparator<PwPair> comparator); void setPwsEndpoint(String pwsEndpoint, int pwsApiVersion); void setPwsEndpoint(String pwsEndpoint, int pwsApiVersion, String pwsApiKey); void fetchPwsResults(final PwsResultCallback pwsResultCallback,
                              final PwsResultIconCallback pwsResultIconCallback); void cancelAllRequests();  }### Answer:
@Test public void getMetadataByRequestUrlReturnsNullForMissingMetadata() { PwsResult pwsResult = physicalWebCollection1.getMetadataByBroadcastUrl(URL2); assertNull(pwsResult); }
@Test public void getMetadataByRequestUrlReturnsFoundMetadata() { PwsResult pwsResult = physicalWebCollection1.getMetadataByBroadcastUrl(URL1); assertEquals(pwsResult.getRequestUrl(), URL1); assertEquals(pwsResult.getSiteUrl(), URL1); assertEquals(pwsResult.getGroupId(), GROUP_ID1); }