TagTemplate implements TagOperations { public void modifyTagAppIds(String tagName, List<String> idsToAdd, List<String> idsToRemove) { ModifyTags modifyTags = new ModifyTags(); modifyTags.setAppIds(idsToAdd, idsToRemove); restOperations.postForObject(URBANAIRSHIP_API_URL + "tags/" + tagName, modifyTags, String.class); } TagTemplate(RestOperations restOperations); List<String> getTags(); List<String> getTags(String deviceToken); void createTag(String tagName); void createTag(String deviceToken, String tagName); void modifyTagTokens(String tagName, List<String> tokensToAdd, List<String> tokensToRemove); void modifyTagPins(String tagName, List<String> pinsToAdd, List<String> pinsToRemove); void modifyTagAppIds(String tagName, List<String> idsToAdd, List<String> idsToRemove); void removeTags(); void removeTag(String deviceToken, String tagName);  }
@Test public void modifyTagAppIds() { mockServer.expect(requestTo("https: .andExpect(method(POST)) .andExpect(body(compactedJson("data/modifytag-appids"))) .andRespond(withResponse("", responseHeaders, HttpStatus.OK, "OK")); urbanAirship.tagOperations().modifyTagAppIds("newtag", asList("id1", "id2"), asList("id3", "id4")); mockServer.verify(); }