Dot extends RelativeLayout { public Dot setActiveDiameterDp(final int activeDiameterDp) { if (activeDiameterDp < 0) { throw new IllegalArgumentException("activeDiameterDp cannot be less than 0"); } setActiveDiameterPx(activeDiameterDp); return this; } Dot(final Context context);  Dot(final Context context, final AttributeSet attrs);  Dot(final Context context, final AttributeSet attrs, final int defStyleAttr); @TargetApi(21)  Dot(final Context context, final AttributeSet attrs, final int defStyleAttr,
			final int defStyleRes); Dot setInactiveDiameterPx(final int inactiveDiameterPx); Dot setInactiveDiameterDp(final int inactiveDiameterDp); int getInactiveDiameter(); Dot setActiveDiameterPx(final int activeDiameterPx); Dot setActiveDiameterDp(final int activeDiameterDp); int getActiveDiameter(); Dot setInactiveColor(final int inactiveColor); int getInactiveColor(); Dot setActiveColor(final int activeColor); int getActiveColor(); Dot setTransitionDuration(final int transitionDurationMs); int getTransitionDuration(); void toggleState(final boolean animate); void setInactive(final boolean animate); void setActive(final boolean animate);  }
@Test(expected = IllegalArgumentException.class) public void setActiveDiameterDp_int_invalidArg_shouldThrowException() { dot.setActiveDiameterDp(-1); }