### Question:
CardInputWidget extends LinearLayout { @NonNull @VisibleForTesting PlacementParameters getPlacementParameters() { return mPlacementParameters; } CardInputWidget(Context context);  CardInputWidget(Context context, AttributeSet attrs);  CardInputWidget(Context context, AttributeSet attrs, int defStyleAttr); @Nullable Card getCard(); void setCardInputListener(@Nullable CardInputListener listener); void setCardNumber(String cardNumber); void setExpiryDate(
            @IntRange(from = 1, to = 12) int month,
            @IntRange(from = 0, to = 9999) int year); void setCvcCode(String cvcCode); void clear(); void setEnabled(boolean isEnabled); @Override boolean isEnabled(); @Override boolean onInterceptTouchEvent(MotionEvent ev); @Override void onWindowFocusChanged(boolean hasWindowFocus);  }### Answer:
@Test public void updateToInitialSizes_returnsExpectedValues() { CardInputWidget.PlacementParameters initialParameters = mCardInputWidget.getPlacementParameters(); assertEquals(190, initialParameters.cardWidth); assertEquals(50, initialParameters.dateWidth); assertEquals(260, initialParameters.cardDateSeparation); assertEquals(380, initialParameters.cardTouchBufferLimit); assertEquals(510, initialParameters.dateStartPosition); }
@Test public void addValidVisaCard_scrollsOver_andSetsExpectedDisplayValues() { mCardNumberEditText.setText(VALID_VISA_WITH_SPACES); CardInputWidget.PlacementParameters shiftedParameters = mCardInputWidget.getPlacementParameters(); assertEquals(40, shiftedParameters.peekCardWidth); assertEquals(185, shiftedParameters.cardDateSeparation); assertEquals(50, shiftedParameters.dateWidth); assertEquals(195, shiftedParameters.dateCvcSeparation); assertEquals(30, shiftedParameters.cvcWidth); }
@Test public void addValidAmExCard_scrollsOver_andSetsExpectedDisplayValues() { mCardNumberEditText.setText(VALID_AMEX_WITH_SPACES); CardInputWidget.PlacementParameters shiftedParameters = mCardInputWidget.getPlacementParameters(); assertEquals(50, shiftedParameters.peekCardWidth); assertEquals(175, shiftedParameters.cardDateSeparation); assertEquals(50, shiftedParameters.dateWidth); assertEquals(185, shiftedParameters.dateCvcSeparation); assertEquals(40, shiftedParameters.cvcWidth); }
@Test public void addDinersClubCard_scrollsOver_andSetsExpectedDisplayValues() { mCardNumberEditText.setText(VALID_DINERS_CLUB_WITH_SPACES); CardInputWidget.PlacementParameters shiftedParameters = mCardInputWidget.getPlacementParameters(); assertEquals(20, shiftedParameters.peekCardWidth); assertEquals(205, shiftedParameters.cardDateSeparation); assertEquals(50, shiftedParameters.dateWidth); assertEquals(195, shiftedParameters.dateCvcSeparation); assertEquals(30, shiftedParameters.cvcWidth); }