### Question:
DefaultConcatUriManager implements ConcatUriManager { public ConcatUri process(Uri uri) { String container = uri.getQueryParameter(Param.CONTAINER.getKey()); if (strictParsing && container == null) { return BAD_URI; } if (strictParsing) { String concatHost = getReqVal(container, CONCAT_HOST_PARAM); String concatPath = getReqVal(container, CONCAT_PATH_PARAM); if (!uri.getAuthority().equalsIgnoreCase(concatHost) || !uri.getPath().equals(concatPath)) { return BAD_URI; } } UriStatus status = UriStatus.VALID_UNVERSIONED; List<Uri> uris = Lists.newLinkedList(); Type type = Type.fromType(uri.getQueryParameter(Param.TYPE.getKey())); if (type == null) { type = Type.fromMime(uri.getQueryParameter("rewriteMime")); if (type == null) { return BAD_URI; } } String splitParam = type == Type.JS ? uri.getQueryParameter(Param.JSON.getKey()) : null; Integer i = Integer.valueOf(START_INDEX); String uriStr = null; while ((uriStr = uri.getQueryParameter(i.toString())) != null) { try { uris.add(Uri.parse(uriStr)); } catch (IllegalArgumentException e) { return BAD_URI; } i++; } if (versioner != null) { String version = uri.getQueryParameter(Param.VERSION.getKey()); if (version != null) { status = versioner.validate(uris, container, version); } } return new ConcatUri(status, uris, splitParam, type, uri); } @Inject  DefaultConcatUriManager(ContainerConfig config, @Nullable Versioner versioner); @Inject(optional = true) void setUseStrictParsing(
      @Named("shindig.uri.concat.use-strict-parsing") boolean useStrict); List<ConcatData> make(List<ConcatUri> resourceUris,
      boolean isAdjacent); ConcatUri process(Uri uri); static final String CONCAT_HOST_PARAM; static final String CONCAT_PATH_PARAM; static final String CONCAT_JS_SPLIT_PARAM; static final String CONCAT_JS_EVAL_TPL; }### Answer:
@Test public void validateNoContainer() { DefaultConcatUriManager manager = makeManager("host.com", "/path", null, null); ConcatUriManager.ConcatUri validated = manager.process(Uri.parse("http: assertEquals(UriStatus.BAD_URI, validated.getStatus()); }
@Test public void validateInvalidChildUri() { DefaultConcatUriManager manager = makeManager("host.com", "/path", null, null); ConcatUriManager.ConcatUri validated = manager.process( Uri.parse("http: "&1=!!!")); assertEquals(UriStatus.BAD_URI, validated.getStatus()); }
@Test public void validateNullTypeUri() { DefaultConcatUriManager manager = makeManager("host.com", "/path", null, null); ConcatUriManager.ConcatUri validated = manager.process( Uri.parse("http: "&1=http: assertEquals(UriStatus.BAD_URI, validated.getStatus()); }
@Test public void validateBadTypeUri() { DefaultConcatUriManager manager = makeManager("host.com", "/path", null, null); ConcatUriManager.ConcatUri validated = manager.process( Uri.parse("http: "&1=http: assertEquals(UriStatus.BAD_URI, validated.getStatus()); }
@Test public void validateOldStyleTypeUri() { DefaultConcatUriManager manager = makeManager("host.com", "/path", null, null); ConcatUriManager.ConcatUri validated = manager.process( Uri.parse("http: "&1=http: assertEquals(UriStatus.VALID_UNVERSIONED, validated.getStatus()); assertEquals(ConcatUriManager.Type.CSS, validated.getType()); }