### Question:
EditAndPromoteJob extends AbstractJob { @VisibleForTesting static BackgroundJob.JobType createJobType( final boolean isCreate, final Environment autopromoteTarget ) { if (isCreate) { switch (autopromoteTarget) { case QA: return BackgroundJob.JobType.TEST_CREATION_PROMOTION_QA; case PRODUCTION: return BackgroundJob.JobType.TEST_CREATION_PROMOTION; default: return BackgroundJob.JobType.TEST_CREATION; } } switch (autopromoteTarget) { case QA: return BackgroundJob.JobType.TEST_EDIT_PROMOTION_QA; case PRODUCTION: return BackgroundJob.JobType.TEST_EDIT_PROMOTION; default: return BackgroundJob.JobType.TEST_EDIT; } } @Autowired  EditAndPromoteJob(
            @Qualifier("trunk") final ProctorStore trunkStore,
            @Qualifier("qa") final ProctorStore qaStore,
            @Qualifier("production") final ProctorStore productionStore,
            final BackgroundJobManager jobManager,
            final BackgroundJobFactory jobFactory,
            final ProctorPromoter promoter,
            final CommentFormatter commentFormatter,
            final MatrixChecker matrixChecker
    ); @Autowired(required = false) void setDefinitionEditChanges(
            final List<PreDefinitionEditChange> preDefinitionEditChanges,
            final List<PostDefinitionEditChange> postDefinitionEditChanges
    ); @Autowired(required = false) void setDefinitionCreateChanges(
            final List<PreDefinitionCreateChange> preDefinitionCreateChanges,
            final List<PostDefinitionCreateChange> postDefinitionCreateChanges
    ); @Autowired(required = false) void setDefinitionPromoteChanges(
            final List<PreDefinitionPromoteChange> preDefinitionPromoteChanges,
            final List<PostDefinitionPromoteChange> postDefinitionPromoteChanges
    ); BackgroundJob<Void> doEdit(
            final String testName,
            final String username,
            final String password,
            final String author,
            final boolean isCreate,
            final String comment,
            final String testDefinitionJson,
            final String previousRevision,
            final Environment autopromoteTarget,
            final Map<String, String[]> requestParameterMap
    ); BackgroundJob<Void> doEdit(
            final String testName,
            final String username,
            final String password,
            final String author,
            final boolean isCreate,
            final String comment,
            final TestDefinition testDefinitionToUpdate,
            final String previousRevision,
            final Environment autopromoteTarget,
            final Map<String, String[]> requestParameterMap
    ); BackgroundJob<Void> doPromote(
            final String testName,
            final String username,
            final String password,
            final String author,
            final Environment source,
            final String srcRevision,
            final Environment destination,
            final String destRevision,
            final Map<String, String[]> requestParameterMap
    );  }### Answer:
@Test public void testCreateJobType() { assertEquals(JobType.TEST_CREATION, EditAndPromoteJob.createJobType(true, Environment.WORKING)); assertEquals(JobType.TEST_CREATION_PROMOTION, EditAndPromoteJob.createJobType(true, Environment.PRODUCTION)); assertEquals(JobType.TEST_CREATION_PROMOTION_QA, EditAndPromoteJob.createJobType(true, Environment.QA)); assertEquals(JobType.TEST_EDIT, EditAndPromoteJob.createJobType(false, Environment.WORKING)); assertEquals(JobType.TEST_EDIT_PROMOTION, EditAndPromoteJob.createJobType(false, Environment.PRODUCTION)); assertEquals(JobType.TEST_EDIT_PROMOTION_QA, EditAndPromoteJob.createJobType(false, Environment.QA)); }