ResultSet resultSet = EasyMock.createNiceMock(ResultSet.class);
EasyMock.expect(resultSet.getStatement()).andReturn(statement);
EasyMock.expect(resultSet.getMetaData()).andReturn(metadata);
EasyMock.replay(resultSet);
QueryDelegate delegate = EasyMock.createNiceMock(QueryDelegate.class);
EasyMock.expect(delegate.getResults(0, 1)).andReturn(resultSet);
EasyMock.replay(delegate);
TestContainer container = new TestContainer(delegate);
new RowItem(container, new RowId(new Object[] { 1 }),