### Question:
NamespaceConvention implements NamespaceContext { public static void buildNsPrefixes(Collection<String> namespaces, Map<String,List<String>> namespaceToPrefixes, Map<String,String> prefixToNamespace, boolean standard) { if(standard) { buildNsPrefixes0(namespaces, namespaceToPrefixes, prefixToNamespace, s_standardPrefixToNSMap); } else { buildNsPrefixes0(namespaces, namespaceToPrefixes, prefixToNamespace, s_standardPrefixToNSMapExcludeSOACommon); } } private  NamespaceConvention(
		Map<String,List<String>> namespaceToPrefixes,
		Map<String,String> prefixToNamespace,
		String singleNamespace, boolean isModifiable); static Map<String,List<String>> buildUnmodifiableNsToPrefixMap(Map<String,List<String>> map); static void buildNsPrefixes(Collection<String> namespaces,
			Map<String,List<String>> namespaceToPrefixes,
			Map<String,String> prefixToNamespace, boolean standard); @Deprecated static void buildNsPrefixes(Collection<String> namespaces,
			Map<String,List<String>> namespaceToPrefixes,
			Map<String,String> prefixToNamespace); static void addToNsPrefixMap(String ns, String prefix,
		Map<String,List<String>> namespaceToPrefixes,
		Map<String,String> prefixToNamespace,
		boolean recreateListIfUnmodifiable); static Map<String,List<String>> getStandardNSToPrefixesMap(boolean soaCommonIncluded); static Map<String,String> getStandardPrefixToNSMap(boolean soaCommonIncluded); static NamespaceConvention createDeserializationNSConvention(IDeserializationContext ctxt); static NamespaceConvention createDeserializationNSConvention(
			String singleNamespace, Map<String, String> prefixToNS, Map<String,List<String>>nsToPrefix); static NamespaceConvention createSerializationNSConvention(ISerializationContext ctxt); static NamespaceConvention createSerializationNSConvention(String singleNamespace, Map<String, String> prefixToNS, Map<String,List<String>>nsToPrefix); static NamespaceConvention createSingleNamespaceSerializationConvention(
		String prefix, String nsURI); boolean isSingleNamespace(); String getSingleNamespace(); void setSingleNamespace(String ns); void addMapping(String prefix, String namespace); String getPrefix(String nsUri); Iterator getPrefixes(String nsUri); String getNamespaceURI(String prefix); String getNamespaceUriNoChecks(String prefix); Map<String, String> getPrefixToNamespaceMap();  }### Answer:
@Test public void buildingPrefixes() { Collection<String> namespaces = new ArrayList<String>(); namespaces.add("abc"); Map<String, List<String>> namespaceToPrefixes = new HashMap<String, List<String>>(); Map<String, String> prefixToNamespace = new HashMap<String, String>(); NamespaceConvention.buildNsPrefixes(namespaces , namespaceToPrefixes , prefixToNamespace , true); Assert.assertThat("Namespace to Prefixes", namespaceToPrefixes.keySet(), hasItem(NS_COMMON_TYPES)); Assert.assertThat("Prefix to Namespaces", prefixToNamespace.values(), hasItem(NS_COMMON_TYPES)); }
@Test public void buildingPrefixes2() { Collection<String> namespaces = new ArrayList<String>(); namespaces.add("abc"); Map<String, List<String>> namespaceToPrefixes = new HashMap<String, List<String>>(); Map<String, String> prefixToNamespace = new HashMap<String, String>(); NamespaceConvention.buildNsPrefixes(namespaces , namespaceToPrefixes , prefixToNamespace , false); Assert.assertThat("Namespace to Prefixes", namespaceToPrefixes.keySet(), not(hasItem(NS_COMMON_TYPES))); Assert.assertThat("Prefix to Namespaces", prefixToNamespace.values(), not(hasItem(NS_COMMON_TYPES))); }