PatchsetCreated event = Setup.createPatchsetCreated();
BuildMemory instance = new BuildMemory();
AbstractProject project = mock(AbstractProject.class);
SkipVote skipVote = new SkipVote(false, false, false, false);
GerritTrigger trigger = mock(GerritTrigger.class);
when(trigger.getSkipVote()).thenReturn(skipVote);
when(project.getTrigger(eq(GerritTrigger.class))).thenReturn(trigger);
AbstractBuild build = mock(AbstractBuild.class);
when(build.getProject()).thenReturn(project);
when(build.getResult()).thenReturn(Result.UNSTABLE);
instance.started(event, build);
AbstractProject project2 = mock(AbstractProject.class);
skipVote = new SkipVote(false, false, false, false);
trigger = mock(GerritTrigger.class);
when(trigger.getSkipVote()).thenReturn(skipVote);
when(project2.getTrigger(eq(GerritTrigger.class))).thenReturn(trigger);
AbstractBuild build2 = mock(AbstractBuild.class);
when(build2.getProject()).thenReturn(project2);
when(build2.getResult()).thenReturn(Result.UNSTABLE);
instance.started(event, build2);
AbstractProject project3 = mock(AbstractProject.class);
skipVote = new SkipVote(true, false, false, false);
trigger = mock(GerritTrigger.class);
when(trigger.getSkipVote()).thenReturn(skipVote);
when(project3.getTrigger(eq(GerritTrigger.class))).thenReturn(trigger);
AbstractBuild build3 = mock(AbstractBuild.class);
when(build3.getProject()).thenReturn(project3);
when(build3.getResult()).thenReturn(Result.SUCCESS);
instance.started(event, build3);