class TodoListController {

    public void observeItemHeight(View itemView) {
        itemView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                emitItemHeightIfNot(itemView);
                itemView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            }
        });
    }

}

class TodoListControllerTest {

    private static final int CONTENT_HEIGHT;
    private static final int ITEM_HEIGHT;
    private TodoListController mTodoListController;
    private List<TodoItemViewModel> mItemViewModelList;
    private Context mContext;
    private TodoItemViewHolder mTodoItemViewHolder;
    private TodoFooterViewHolder mTodoFooterViewHolder;
    private View mFooterView;
    @Rule
    public PowerMockRule rule;
    @Mock
    private EventBus mEventBus;

    @Test
    public void testObserveItemHeight() throws Exception {

        mTodoListController.observeItemHeight(mockFooterView());
    }

}