TwitterAuthConfig implements Parcelable { static String sanitizeAttribute(String input) { if (input != null) { return input.trim(); } else { return null; } } TwitterAuthConfig(String consumerKey, String consumerSecret); private  TwitterAuthConfig(Parcel in); String getConsumerKey(); String getConsumerSecret(); int getRequestCode(); @Override int describeContents(); @Override void writeToParcel(Parcel out, int flags); static final int DEFAULT_AUTH_REQUEST_CODE; static final Parcelable.Creator<TwitterAuthConfig> CREATOR; }
@Test public void testSanitizeAttribute_nullAttribute() { assertNull(TwitterAuthConfig.sanitizeAttribute(null)); }
@Test public void testSanitizeAttribute_sanitizedString() { final String test = "test"; assertEquals(test, TwitterAuthConfig.sanitizeAttribute(test)); }
@Test public void testSanitizeAttribute_withWhitespace() { final String test = "\ttest "; assertEquals("test", TwitterAuthConfig.sanitizeAttribute(test)); }