public TargetState initialTargetState() {
        if (initialState != null) {
            return initialState.toTargetState();
        } else {
            return null;
        }
    }
@Test
    public void testToTargetState() {
        assertEquals(TargetState.STARTED, CreateConnectorRequest.InitialState.RUNNING.toTargetState());
        assertEquals(TargetState.PAUSED, CreateConnectorRequest.InitialState.PAUSED.toTargetState());
        assertEquals(TargetState.STOPPED, CreateConnectorRequest.InitialState.STOPPED.toTargetState());

        CreateConnectorRequest createConnectorRequest = new CreateConnectorRequest("test-name", Collections.emptyMap(), null);
        assertNull(createConnectorRequest.initialTargetState());
    }