@@ -0,0 +1,1550 @@
+package uk.ac.ic.wlgitbridge.snapshot.push;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport uk.ac.ic.wlgitbridge.snapshot.push.exception.InternalErrorException;%0Aimport uk.ac.ic.wlgitbridge.snapshot.push.exception.SnapshotPostException;%0Aimport uk.ac.ic.wlgitbridge.snapshot.push.exception.UnexpectedPostbackException;%0A%0A/**%0A * Created by winston on 05/04/2016.%0A */%0Apublic class PostbackManagerTest %7B%0A%0A    private final PostbackManager postbackManager = new PostbackManager();%0A%0A    @Test%0A    public void testRaceWithVersionId()%0A            throws UnexpectedPostbackException,%0A                   SnapshotPostException %7B%0A        String key = postbackManager.makeKeyForProject(%22proj%22);%0A        postbackManager.postVersionIDForProject(%22proj%22, 1, key);%0A        int versionId = postbackManager.waitForVersionIdOrThrow(%22proj%22);%0A        Assert.assertEquals(%22Version id didn't match posted%22, 1, versionId);%0A    %7D%0A%0A    @Test%0A    public void testRaceWithException() throws UnexpectedPostbackException,%0A                                               SnapshotPostException %7B%0A        String key = postbackManager.makeKeyForProject(%22proj%22);%0A        InternalErrorException ex = new InternalErrorException();%0A        postbackManager.postExceptionForProject(%22proj%22, ex, key);%0A        try %7B%0A            postbackManager.waitForVersionIdOrThrow(%22proj%22);%0A        %7D catch (InternalErrorException e) %7B%0A            Assert.assertSame(%22Wrong exception was thrown%22, ex, e);%0A            return;%0A        %7D%0A        Assert.fail(%22Exception wasn't thrown as required%22);%0A    %7D%0A%0A%7D%0A

Add tests that reproduce #1384.