assertNotNull(cause);
BadgeAction action = freeStyleBuild.getAction(BadgeAction.class);
assertNotNull(action);
GerritTriggeredEvent event = action.getEvent();
assertNotNull(event);
GerritEventType eventType = event.getEventType();
assertEquals(eventType.getEventRepresentative(), PatchsetCreated.class);
}