    @Test
    public void testEdgeItemsCenteringOnAndOff() throws Throwable {

        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                WearableRecyclerView wrv =
                        (WearableRecyclerView) mActivityRule.getActivity().findViewById(R.id.wrv);
                wrv.setEdgeItemsCenteringEnabled(true);
            }
        });

        InstrumentationRegistry.getInstrumentation().waitForIdleSync();

        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                WearableRecyclerView wrv =
                        (WearableRecyclerView) mActivityRule.getActivity().findViewById(R.id.wrv);
                View child = wrv.getChildAt(0);
                assertNotNull("child", child);
                assertEquals((wrv.getHeight() - child.getHeight()) / 2, child.getTop());
            }
        });

        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                WearableRecyclerView wrv =
                        (WearableRecyclerView) mActivityRule.getActivity().findViewById(R.id.wrv);
                wrv.setEdgeItemsCenteringEnabled(false);
            }
        });

        InstrumentationRegistry.getInstrumentation().waitForIdleSync();

        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                WearableRecyclerView wrv =
                        (WearableRecyclerView) mActivityRule.getActivity().findViewById(R.id.wrv);
                View child = wrv.getChildAt(0);
                assertNotNull("child", child);
                assertEquals(0, child.getTop());

            }
        });
    }