@@ -0,0 +1,1452 @@
+package org.netmelody.cieye.spies.jenkins.jsondomain.test;%0A%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0Aimport org.netmelody.cieye.spies.jenkins.jsondomain.Build;%0Aimport org.netmelody.cieye.spies.jenkins.jsondomain.JobDetail;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0A%0Apublic final class JobDetailTest %7B%0A%0A    @Test public void%0A    correctlyDeterminesTheLastFailedBuildUrl() %7B%0A        final JobDetail jobDetail = new JobDetail();%0A        jobDetail.lastUnstableBuild = build(123, %22http://blah/455%22);%0A        jobDetail.lastUnsuccessfulBuild = build(9, %22http://blah/454%22);%0A        jobDetail.lastFailedBuild = build(456, %22http://blah/456%22);%0A        %0A        assertThat(jobDetail.lastBadBuildUrl(), is(%22http://blah/456%22));%0A    %7D%0A    %0A    @Ignore(%22excites bug that needs fixing asap%22)%0A    @Test public void%0A    correctlyDeterminesTheLastFailedBuildUrlWithNonLexographicUrls() %7B%0A        final JobDetail jobDetail = new JobDetail();%0A        jobDetail.lastUnstableBuild = build(123, %22http://blah/123%22);%0A        jobDetail.lastUnsuccessfulBuild = build(9, %22http://blah/9%22);%0A        jobDetail.lastFailedBuild = build(456, %22http://blah/456%22);%0A        %0A        assertThat(jobDetail.lastBadBuildUrl(), is(%22http://blah/456%22));%0A    %7D%0A%0A    private Build build(long number, String url) %7B%0A        final Build build = new Build();%0A        build.number = number;%0A        build.url = url;%0A        return build;%0A    %7D%0A%0A%7D%0A

create test case for bug in determining last bad build on Jenkins