assertTrue(obj instanceof MatrixRun);
MatrixRun run = (MatrixRun)obj;
Cause.UpstreamCause upCause = run.getCause(Cause.UpstreamCause.class);
List upstreamCauses = Whitebox.getInternalState(upCause, "upstreamCauses");
GerritCause cause = (GerritCause)upstreamCauses.get(0);
assertNotNull(cause.getEvent());
assertThat("Event is not a ChangeBasedEvent", cause.getEvent(), instanceOf(ChangeBasedEvent.class));
ChangeBasedEvent changeBasedEvent = (ChangeBasedEvent)cause.getEvent();
assertEquals("platform/project", changeBasedEvent.getChange().getProject());
assertNotNull(cause.getContext());
assertNotNull(cause.getContext().getThisBuild());
assertEquals("Gerrit_master-theme_matrix", cause.getContext().getThisBuild().getProjectId());
assertEquals(102, cause.getContext().getThisBuild().getBuildNumber().intValue());
assertNotNull(cause.getContext().getOthers());
assertEquals(1, cause.getContext().getOthers().size());
TriggeredItemEntity entity = cause.getContext().getOthers().get(0);
assertEquals("master-theme", entity.getProjectId());
assertNull(entity.getBuildNumber());
}