### Question:
ExternalGroups extends GenericJson { public List<ExternalGroup> getExternalGroups() { if (externalGroups == null) { return ImmutableList.of(); } return ImmutableList.copyOf(externalGroups); }  static ExternalGroups fromConfiguration(); static ExternalGroups fromFile(File groupsFile); List<ExternalGroup> getExternalGroups(); static final String CONFIG_EXTERNALGROUPS_FILENAME; @Key
  public List<ExternalGroup> externalGroups; }### Answer:
@Test public void emptyObject_listIsEmpty() throws Exception { ExternalGroups externalGroups = fromString("{}"); assertEquals(0, externalGroups.getExternalGroups().size()); }
@Test public void emptyMembers_listIsEmpty() throws Exception { ExternalGroups externalGroups = fromString("{\"externalGroups\":[{\"name\":\"groupName\"}]}"); assertEquals(1, externalGroups.getExternalGroups().size()); assertEquals(0, externalGroups.getExternalGroups().get(0).getMembers().size()); }