### Question:
JSONService { public <T> Set<T> deserializeSet(final Class<T> t, Set<String> jsons) { return FluentIterable.from(jsons) .transform(new Function<String, T>() { @Override public T apply(String input) { return deserialize(t, input); } }) .toSet(); } @Inject protected  JSONService(); T deserialize(Class<T> t, String json); Set<T> deserializeSet(final Class<T> t, Set<String> jsons); String serialize(Object object); Set<String> serializeSet(Set<T> objects);  }### Answer:
@Test public void testDeserializeSetSingleValue() { Set<MSEventUid> deserializedSet = new JSONService().deserializeSet(MSEventUid.class, ImmutableSet.<String> of("{\"uid\":\"uid1\"}")); MSEventUid expectedMSEventUid = new MSEventUid("uid1"); assertThat(deserializedSet).containsOnly(expectedMSEventUid); }
@Test public void testDeserializeSet() { Set<MSEventUid> deserializedSet = new JSONService().deserializeSet(MSEventUid.class, ImmutableSet.<String> of("{\"uid\":\"uid1\"}", "{\"uid\":\"uid2\"}")); MSEventUid expectedMSEventUid = new MSEventUid("uid1"); MSEventUid expectedMSEventUid2 = new MSEventUid("uid2"); assertThat(deserializedSet).containsOnly(expectedMSEventUid, expectedMSEventUid2); }
@Test public void testEmptyDeserializeSet() { Set<MSEventUid> deserializedSet = new JSONService().deserializeSet(MSEventUid.class, ImmutableSet.<String> of()); assertThat(deserializedSet).isEmpty(); }