TemplateResource { protected Set<String> keywordsFromString(String keywords) { Set<String> keywordSet = new LinkedHashSet<>(); if (keywords != null) { String[] splitKeywords = keywords.split("\\|"); if (splitKeywords != null) { keywordSet.addAll(Arrays.asList(splitKeywords)); } } return keywordSet; }  @GET @Path("/item/{id}") @Produces(MediaType.APPLICATION_JSON) Response getTemplate(@PathParam("id") String id, @Context Request request); Response instantiateTemplate(Document metadataXml, ParsedMetadata parsedMetadata, String id, String content); @POST @Path("/storm") @Produces(MediaType.APPLICATION_JSON) @ConfiguredRolesAllowed(ConfiguredRolesAllowedDynamicFeature.CCH_ADMIN_USER_PROP) Response instantiateStormTemplate(
			@FormDataParam("layerId") String layerId,
			@FormDataParam("activeStorm") String active,
			@FormDataParam("alias") String alias,
			@FormDataParam("copyType") String copyType,
			@FormDataParam("copyVal") String copyVal,
			@FormDataParam("trackId") String trackId,
			@FormDataParam("file") String metadataFile);  }
@Test public void testKeywordsFromString() { String keywords = "test|a list|of|keywords"; Set<String> result = instance.keywordsFromString(keywords); assertThat(result.size(), is(equalTo(4))); }