View implements Serializable { public Bundle getBundleByName(String bundleName) { for (Bundle bundle : this.bundles) { if (bundle.getName().equals(bundleName)) { return bundle; } } return null; }  String getUrl(); JSONObject getMetadata(); String getMetadataAsString(); void setMetadata(JSONObject metadata); long getId(); void setId(long id); long getOldId(); void setOldId(long oldId); String getUuid(); void setUuid(String uuid); boolean isOnlyForUuId(); void setOnlyForUuId(boolean onlyForUuId); String getName(); void setName(String name); String getDescription(); void setDescription(String description); String getApplication(); void setApplication(String as); String getPage(); void setPage(String ba); long getCreator(); void setCreator(long creator); boolean isPublic(); void setIsPublic(boolean isPublic); boolean isDefault(); void setIsDefault(boolean isDefault); String getPubDomain(); void setPubDomain(String pd); String getLang(); void setLang(String lang); String getType(); void setType(String type); String toString(); Bundle getBundleByName(String bundleName); List<Bundle> getBundles(); void setBundles(List<Bundle> bundles); void addBundle(final Bundle bundle); void removeBundle(final String bundleName); void pushBundleLast(String bundleName); View cloneBasicInfo(); JSONObject getMapOptions(); String getSrsName();  }
@Test public void testGetBundleByName() throws Exception { View view = getView(); final String bundleName = "bundle_3"; Bundle bundle = view.getBundleByName(bundleName); Assert.assertEquals("Bundle name should match", bundleName, bundle.getName()); }