RealtimeBarUtil { public static String getJobName(RealtimeBarRequest realtimeBarRequest) { return "ticker: " + realtimeBarRequest.getTicker().getSymbol() + " type: " + realtimeBarRequest.getTicker().getInstrumentType() + " barLength:" + realtimeBarRequest.getTimeInterval() + realtimeBarRequest.getTimeUnit(); }  static JobDetail buildJob(String jobName, IBarBuilder barBuilder); static Trigger getTrigger(String jobName, int interval, LengthUnit units); static Date getFirstScheduledDate(Date date, int interval); static String getJobName(RealtimeBarRequest realtimeBarRequest); static LocalDateTime getBarDate(); static final String BAR_BUILDER_DATA; }
@Test public void testGetBarName() { int requestId = 1; Ticker ticker = new StockTicker("qqq"); int timeInterval = 1; RealtimeBarRequest realtimeBarRequest = new RealtimeBarRequest(requestId, ticker, timeInterval, LengthUnit.MINUTE); String expected = "ticker: " + realtimeBarRequest.getTicker().getSymbol() + " type: " + realtimeBarRequest.getTicker().getInstrumentType()+ " barLength:" + realtimeBarRequest.getTimeInterval() + realtimeBarRequest.getTimeUnit(); assertEquals(expected, RealtimeBarUtil.getJobName(realtimeBarRequest)); }