@Test
public void testWriteToJson() throws Exception {

    TeamTagMap ttm = new TeamTagMap();
    ttm = ttm.addTagToTeam("abcd", 4);
    ttm = ttm.addTagToTeam("deff", 5);
    ttm = ttm.addTagToTeam("adcb", 4);
    String result = Serialization.getJsonMapper().writeValueAsString(ttm);
    assertThat(result, equalTo("{\"4\":[\"abcd\",\"adcb\"],\"5\":[\"deff\"]}"));
}