use of com.thinkbiganalytics.metadata.sla.api.core.FeedOnTimeArrivalMetric in project kylo by Teradata.
the class FeedOnTimeArrivalMetricAssessorTest method setUp.
@Before
public void setUp() throws Exception {
initMocks(this);
when(this.builder.message(any(String.class))).thenReturn(this.builder);
when(this.builder.metric(any(Metric.class))).thenReturn(this.builder);
when(this.builder.result(any(AssessmentResult.class))).thenReturn(this.builder);
this.assessor.setMetadataAccess(this.metadataAccess);
// Noon every day
CronExpression cron = new CronExpression("0 0 12 1/1 * ? *");
this.lateTime = new DateTime(CronExpressionUtil.getPreviousFireTime(cron)).plusHours(4);
this.metric = new FeedOnTimeArrivalMetric("feed", cron, Period.hours(lateTimeGracePeriod));
}
Aggregations