WaypointList extends RecyclerView { public final boolean addEntry(final WaypointEntry entry) { if (mWaypointEntries.size() == mMaxWaypointCount) { throw new IllegalArgumentException( getContext().getString(R.string.msdkui_exception_waypoint_exceed_max)); } if (entry == null) { throw new IllegalArgumentException( getContext().getString(R.string.msdkui_exception_waypoint_entry_null)); } boolean ret = false; ret = mWaypointEntries.add(entry); mAdapter.notifyEntryAdded(mWaypointEntries.size() - 1, entry); return ret; } WaypointList(final Context context);  WaypointList(final Context context, final AttributeSet attrs);  WaypointList(final Context context, final AttributeSet attrs, final int defStyleAttr); final WaypointEntry addEmptyEntry(); final WaypointEntry insertEmptyEntry(final int index); final boolean addEntry(final WaypointEntry entry); void insertEntry(final int index, final WaypointEntry entry); void updateEntry(final int index, final WaypointEntry entry); WaypointEntry removeEntry(final int index); int getMinWaypointItems(); void setMinWaypointItems(final int count); void setMaxWaypointItems(final int count); int getMaxWaypointItems(); void setVisibleNumberOfWaypointItems(final int count); int getVisibleWaypointItems(); void reset(); void reverse(); List<WaypointEntry> getEntries(); void setEntries(final List<WaypointEntry> entries); List<RouteWaypoint> getRouteWaypoints(); int getEntriesCount(); void setListener(final WaypointList.Listener listener);  }
@Test(expected = IllegalArgumentException.class) public void testAddNullEntryException() { mWaypointList.addEntry(null); }