<NME> OAuthTest.java
<BEF> package cgeo.geocaching.network;

import org.junit.Test;
import static org.assertj.core.api.Java6Assertions.assertThat;

public class OAuthTest {

    /**
     * Test example from https://dev.twitter.com/oauth/overview/creating-signatures
     */
    @Test
    public void testOAuthSignature() {
        final Parameters params = new Parameters(
                "status", "Hello Ladies + Gentlemen, a signed OAuth request!",
                "include_entities", "true",
                "oauth_consumer_key", "xvz1evFS4wEEPTGEFPHBog",
                "oauth_nonce", "kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg",
                "oauth_signature_method", "HMAC-SHA1",
                "oauth_timestamp", "1318622958",
                "oauth_token", "370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb",
                "oauth_version", "1.0");
        assertThat(OAuth.signCompletedOAuth("api.twitter.com", "/1/statuses/update.json", "POST", true,
                params, "LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE", "kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw"))
                .isEqualTo("tnnArxj06cWHq44gCs1OSKk/jLY=");
    }

}
        for (Character c : UNRESERVED) {
            final @NonNull
            String charAsString = String.valueOf(c);
            assertEquals("wrong OAuth encoding for " + c, charAsString, OAuth.percentEncode(charAsString));
        }
    }

            if (!UNRESERVED.contains(c)) {
                final @NonNull
                String charAsString = String.valueOf(c);
                final String encoded = OAuth.percentEncode(charAsString);
                assertThat(charAsString).overridingErrorMessage("Character '" + charAsString + "' not encoded").isNotEqualTo(encoded);
                assertThat(encoded).startsWith("%");
            }
    }

    public static void testAsterisk() {
        assertThat("*".equals(OAuth.percentEncode("*"))).isFalse();
    }
}

<MSG> percentEncode has moved, fix tests

<DFF> @@ -32,7 +32,7 @@ public class OAuthTest extends TestCase {
         for (Character c : UNRESERVED) {
             final @NonNull
             String charAsString = String.valueOf(c);
-            assertEquals("wrong OAuth encoding for " + c, charAsString, OAuth.percentEncode(charAsString));
+            assertEquals("wrong OAuth encoding for " + c, charAsString, Parameters.percentEncode(charAsString));
         }
     }
 
@@ -42,7 +42,7 @@ public class OAuthTest extends TestCase {
             if (!UNRESERVED.contains(c)) {
                 final @NonNull
                 String charAsString = String.valueOf(c);
-                final String encoded = OAuth.percentEncode(charAsString);
+                final String encoded = Parameters.percentEncode(charAsString);
                 assertThat(charAsString).overridingErrorMessage("Character '" + charAsString + "' not encoded").isNotEqualTo(encoded);
                 assertThat(encoded).startsWith("%");
             }
@@ -50,6 +50,6 @@ public class OAuthTest extends TestCase {
     }
 
     public static void testAsterisk() {
-        assertThat("*".equals(OAuth.percentEncode("*"))).isFalse();
+        assertThat("*".equals(Parameters.percentEncode("*"))).isFalse();
     }
 }

percentEncode has moved, fix tests