### Question:
SelectShippingMethodWidget extends FrameLayout { public ShippingMethod getSelectedShippingMethod() { return mShippingMethodAdapter.getSelectedShippingMethod(); } SelectShippingMethodWidget(Context context);  SelectShippingMethodWidget(Context context, AttributeSet attrs);  SelectShippingMethodWidget(Context context, AttributeSet attrs, int defStyleAttr); ShippingMethod getSelectedShippingMethod(); void setShippingMethods(List<ShippingMethod> shippingMethods, ShippingMethod defaultShippingMethod);  }### Answer:
@Test public void selectShippingMethodWidget_whenSelected_selectionChanges() { assertEquals(mShippingMethodAdapter.getSelectedShippingMethod(), mShippingMethods.get(0)); mShippingMethodAdapter.setSelectedIndex(1); assertEquals(mShippingMethodAdapter.getSelectedShippingMethod(), mShippingMethods.get(1)); }