@@ -0,0 +1,1715 @@
+package hudson.plugins.git;%0A%0Aimport java.util.ArrayList;%0A%0Aimport hudson.model.User;%0A%0Aimport org.junit.Test;%0Aimport org.junit.Rule;%0Aimport static org.junit.Assert.*;%0A%0Aimport org.jvnet.hudson.test.JenkinsRule;%0A%0Apublic class GitChangeSetMalformedEmailTest %7B%0A%0A    @Rule%0A    public JenkinsRule jenkins = new JenkinsRule();%0A%0A    private final String badEmail = %22@%22;%0A%0A    private GitChangeSet genChangeSetWithBadEmail(boolean authorOrCommitter) %7B%0A        ArrayList%3CString%3E lines = new ArrayList%3CString%3E();%0A        lines.add(%22commit 1567861636cd854f4dd6fa40bf94c0c657681dd5%22);%0A        lines.add(%22tree 66236cf9a1ac0c589172b450ed01f019a5697c49%22);%0A        lines.add(%22parent e74a24e995305bd67a180f0ebc57927e2b8783ce%22);%0A        lines.add(%22author Bad Author %3C%22 + badEmail + %22%3E 1363879004 +0100%22); // Bad e-mail address%0A        lines.add(%22committer Bad Committer %3C%22 + badEmail + %22%3E 1364199539 -0400%22); // Bad e-mail address%0A        lines.add(%22%22);%0A        lines.add(%22    Committer and author have bad e-mail addresses.%22);%0A        lines.add(%22    %22);%0A        lines.add(%22    Changes in this version:%22);%0A        lines.add(%22    - Committer has bad e-mail address.%22);%0A        lines.add(%22    - Author has bad e-mail address.%22);%0A        lines.add(%22    %22);%0A        lines.add(%22%22);%0A        return new GitChangeSet(lines, authorOrCommitter);%0A    %7D%0A%0A    @Test%0A    public void testFindOrCreateUserBadEmailAuthor() %7B%0A        assertEquals(User.getUnknown(), genChangeSetWithBadEmail(true).findOrCreateUser(%22Bad Author%22, badEmail, false));%0A    %7D%0A%0A    @Test%0A    public void testFindOrCreateUserBadEmailCommitter() %7B%0A        assertEquals(User.getUnknown(), genChangeSetWithBadEmail(false).findOrCreateUser(%22Bad Committer%22, badEmail, false));%0A    %7D%0A%7D%0A

Add test of invalid email