@Test
public void thatCreateListFromCursor() {

    Date createDate = new Date();
    Date updateDate = new Date();
    Cursor cursor = createCursor(5, createDate, updateDate);
    List<HaloModule> modules = HaloModule.fromCursor(cursor, false);
    assertThat(modules.size()).isEqualTo(5);
    for (HaloModule module : modules) {
        assertCursorModule(module, createDate, updateDate);
    }
    assertThat(cursor.isClosed()).isFalse();
    cursor = createCursor(5, createDate, updateDate);
    modules = HaloModule.fromCursor(cursor, true);
    assertThat(modules.size()).isEqualTo(5);
    for (HaloModule module : modules) {
        assertCursorModule(module, createDate, updateDate);
    }
    assertThat(cursor.isClosed()).isTrue();
}