import junit.framework.TestCase; public class GravatarTest extends TestCase { public void testAddressesOne() { Gravatar g = new Gravatar(); assertEquals("0c17bf66e649070167701d2d3cd71711", g.getId("test@example.org")); } public void testAddressesTwo() { Gravatar g = new Gravatar(); assertEquals("ae46d8cbbb834a85db7287f8342d0c42", g.getId("x@example.org")); } public void testIgnoreCase() { Gravatar g = new Gravatar(); assertEquals( "55502f40dc8b7c769880b10874abc9d0", g.getId("Test@EXAMPLE.com") ); } public void testTrimming() { Gravatar g = new Gravatar(); assertEquals( "55502f40dc8b7c769880b10874abc9d0", g.getId(" Test@Example.com ") ); } public void testAvatarUrl() { Gravatar g = new Gravatar(); assertEquals( "http://www.gravatar.com/avatar/0c17bf66e649070167701d2d3cd71711", g.getAvatarUrl(" Test@Example.orG ") ); } }