@Test
public void convert() throws Exception {
Map<String, String> conf = map(KEY_DIRECTORY, folder.getRoot().getAbsolutePath());
Map<String, String> vars = map();
ServiceProfile<FlowLoggerProvider> sp = profile(conf, vars);
FlowLoggerProfile profile = FlowLoggerProfile.convert(sp);
assertThat(profile.getDirectory().getCanonicalFile(), is(folder.getRoot().getCanonicalFile()));
assertThat(profile.getEncoding(), is(Charset.forName(DEFAULT_ENCODING)));
assertThat(profile.getDateFormat(), is((DateFormat) new SimpleDateFormat(DEFAULT_DATE_FORMAT)));
assertThat(profile.getStepUnit(), closeTo(Double.parseDouble(DEFAULT_STEP_UNIT), 0.00001));
assertThat(profile.isReportJob(), is(Boolean.parseBoolean(DEFAULT_REPORT_JOB)));
assertThat(profile.isDeleteOnSetup(), is(Boolean.parseBoolean(DEFAULT_DELETE_ON_SETUP)));
assertThat(profile.isDeleteOnCleanup(), is(Boolean.parseBoolean(DEFAULT_DELETE_ON_CLEANUP)));
}