LetterSource { @Override public String toString() { return displayName; } LetterSource();  LetterSource(NearbyPerson other); @Override String toString(); public Long _id; public String googlePlusId; public String letter; public String displayName; public int available; }
@Test public void empty() { LetterSource source = new LetterSource(); assertNull(source.letter); assertNull(source.displayName); assertNull(source.googlePlusId); assertEquals(1, source.available); assertNull(source.toString()); }
@Test public void fromNearbyPerson() { NearbyPerson person = new NearbyPerson("googlePlusId", "N", "Name", null); LetterSource source = new LetterSource(person); assertEquals("N", source.letter); assertEquals("Name", source.displayName); assertEquals("googlePlusId", source.googlePlusId); assertEquals(1, source.available); assertEquals("Name", source.toString()); }