### Question:
WmsRequestBuilder { public URL toMapUrl() throws MalformedURLException { StringBuilder url = new StringBuilder(); Map<WmsRequestParameter, String> params = new LinkedHashMap<WmsRequestParameter, String>(this.parameters); String wmsUrl = params.remove(WmsRequestParameter.WMS_URL).toString(); url.append(wmsUrl); if (wmsUrl.indexOf("?") == -1) { url.append("?"); } java.util.List<String> paramList = new ArrayList<String>(); for (WmsRequestParameter parameter : WmsRequestParameter.parameterValues()) { if (parameter == WmsRequestParameter.URL_PARAMETERS) { continue; } Object defaultValue = parameter.defaultValue(params); if (params.containsKey(parameter) || parameter.isRequired(params) || defaultValue != null) { String parameterName = parameter.parameterName(params); Object value = parameter.extract(params); paramList.add(encodeParameter(parameterName, value.toString())); } } Iterator<String> iterator = paramList.iterator(); while (iterator.hasNext()) { String param = iterator.next(); url.append(param); if (iterator.hasNext()) { url.append("&"); } } Object urlParams = params.remove(WmsRequestParameter.URL_PARAMETERS); if (urlParams != null) { String extraUrlParams = urlParams.toString(); if (!extraUrlParams.startsWith("&")) { url.append("&"); } url.append(extraUrlParams); } return new URL(url.toString()); }  static WmsRequestBuilder createGetMapRequest(String serviceUrl); static WmsRequestBuilder createGetMapRequest(
      Map<WmsRequestParameter, String> params); WmsRequestBuilder layers(String layers); WmsRequestBuilder styles(String styles); WmsRequestBuilder format(String format); WmsRequestBuilder boundingBox(String boundingBox); WmsRequestBuilder transparent(boolean transparent); WmsRequestBuilder version(String version); WmsRequestBuilder srsCrs(String srsCrs); WmsRequestBuilder urlParameters(String urlParameters); WmsRequestBuilder width(int width); WmsRequestBuilder height(int height); URL toMapUrl();  }### Answer:
@Test public void testStylesDefaults() throws MalformedURLException { String url = basicRequestBuilder() .toMapUrl().toExternalForm(); assertThat(url, containsString("STYLE=%2C%2C")); System.out.println(url); }
@Test public void testFormatDefault() throws MalformedURLException { String url = basicRequestBuilder().toMapUrl().toExternalForm(); assertThat(url, containsString("FORMAT=image%2Fpng")); }