### Question:
MemoryEntrySequence extends AbstractEntrySequence { @Override public GroupConfigEntryList buildGroupConfigEntryList() { GroupConfigEntryList list = new GroupConfigEntryList(); for (Entry entry : entries) { if (entry instanceof GroupConfigEntry) { list.add((GroupConfigEntry) entry); } } return list; } MemoryEntrySequence();  MemoryEntrySequence(int logIndexOffset); @Override void commit(int index); @Override int getCommitIndex(); @Override GroupConfigEntryList buildGroupConfigEntryList(); @Override void close(); @Override String toString();  }### Answer:
@Test public void testBuildGroupConfigList() { MemoryEntrySequence sequence = new MemoryEntrySequence(2); sequence.append(Arrays.asList( new AddNodeEntry(2, 1, Collections.emptySet(), new NodeEndpoint("A", "localhost", 2333)), new NoOpEntry(3, 1), new RemoveNodeEntry(4, 1, Collections.emptySet(), new NodeId("A")) )); GroupConfigEntryList list = sequence.buildGroupConfigEntryList(); Iterator<GroupConfigEntry> iterator = list.iterator(); Assert.assertEquals(2, iterator.next().getIndex()); Assert.assertEquals(4, iterator.next().getIndex()); Assert.assertFalse(iterator.hasNext()); }