@Override
    public Process swapToObject(final YamlProcess yamlConfig) {
        return new Process(yamlConfig.getId(), yamlConfig.getStartMillis(), yamlConfig.getSql(), yamlConfig.getDatabaseName(), yamlConfig.getUsername(), yamlConfig.getHostname(),
                new AtomicInteger(yamlConfig.getTotalUnitCount()), new AtomicInteger(yamlConfig.getCompletedUnitCount()), new AtomicBoolean(yamlConfig.isIdle()),
                new AtomicBoolean(yamlConfig.isInterrupted()));
    }
@Test
    void assertSwapToObject() {
        Process actual = new YamlProcessSwapper().swapToObject(createYamlProcess());
        assertThat(actual.getId(), is("foo_id"));
        assertThat(actual.getStartMillis(), is(1000L));
        assertThat(actual.getSql(), is("SELECT 1"));
        assertThat(actual.getDatabaseName(), is("foo_db"));
        assertThat(actual.getUsername(), is("root"));
        assertThat(actual.getHostname(), is("localhost"));
        assertThat(actual.getTotalUnitCount().get(), is(10));
        assertThat(actual.getCompletedUnitCount().get(), is(5));
        assertTrue(actual.isIdle());
    }