PriamConfigurationPersister extends Task { public static TaskTimer getTimer(IConfiguration config) { return CronTimer.getCronTimer(NAME, config.getMergedConfigurationCronExpression()); } @Inject  PriamConfigurationPersister(IConfiguration config); @Override void execute(); @Override String getName(); static TaskTimer getTimer(IConfiguration config); static final String NAME; }
@Test public void getTimer() { assertEquals( "0 * * * * ? *", PriamConfigurationPersister.getTimer(fakeConfiguration).getCronExpression()); }