@Test public void testGetAll() { final Record firstRecord = mock(Record.class); final Record secondRecord = mock(Record.class); final RecordImplFactory factory = mock(RecordImplFactory.class); when(factory.createNestedRecord(MOCK_STRUCTURE, MOCK_RECORD)).thenReturn(firstRecord).thenReturn(secondRecord); final RecordListImpl list = new RecordListImpl(MOCK_RECORD, MOCK_STRUCTURE, 2, factory); assertThat(list.getAll()).containsExactly(firstRecord, secondRecord); }
@Override public List<Record> getAll() { return Collections.unmodifiableList(records); }
RecordListImpl implements RecordList { @Override public List<Record> getAll() { return Collections.unmodifiableList(records); } }
RecordListImpl implements RecordList { @Override public List<Record> getAll() { return Collections.unmodifiableList(records); } RecordListImpl(final Record parent, final Structure structure, final int listSize);   RecordListImpl(final Record parent, final Structure structure, final int listSize,
            final RecordImplFactory recordFactory); }
RecordListImpl implements RecordList { @Override public List<Record> getAll() { return Collections.unmodifiableList(records); } RecordListImpl(final Record parent, final Structure structure, final int listSize);   RecordListImpl(final Record parent, final Structure structure, final int listSize,
            final RecordImplFactory recordFactory); @Override List<Record> getAll(); @Override Record get(final int index); @Override int getSize(); @Override Structure getStructure(); @Override Iterator<Record> iterator(); }
RecordListImpl implements RecordList { @Override public List<Record> getAll() { return Collections.unmodifiableList(records); } RecordListImpl(final Record parent, final Structure structure, final int listSize);   RecordListImpl(final Record parent, final Structure structure, final int listSize,
            final RecordImplFactory recordFactory); @Override List<Record> getAll(); @Override Record get(final int index); @Override int getSize(); @Override Structure getStructure(); @Override Iterator<Record> iterator();  }