### Question:
SecHubConfiguration implements JSONable<SecHubConfiguration> { public Optional<SecHubCodeScanConfiguration> getCodeScan() { return codeScan; }  static SecHubConfiguration createFromJSON(String json); void setProjectId(String projectId); String getProjectId(); void setApiVersion(String apiVersion); String getApiVersion(); void setWebScan(SecHubWebScanConfiguration webScan); Optional<SecHubWebScanConfiguration> getWebScan(); void setCodeScan(SecHubCodeScanConfiguration codeScan); Optional<SecHubCodeScanConfiguration> getCodeScan(); void setInfraScan(SecHubInfrastructureScanConfiguration infraStructureScan); Optional<SecHubInfrastructureScanConfiguration> getInfraScan(); @Override Class<SecHubConfiguration> getJSONTargetClass(); static final String PROPERTY_PROJECT_ID; static final String PROPERTY_API_VERSION; static final String PROPERTY_WEB_SCAN; static final String PROPERTY_INFRA_SCAN; static final String PROPERTY_CODE_SCAN; }### Answer:
@Test public void sechub_config2_json_file_from_json_has_no_codescanconfig() throws Exception { String json = SharedKernelTestFileSupport.getTestfileSupport().loadTestFile("sechub_config2.json"); SecHubConfiguration result = SECHUB_CONFIG.fromJSON(json); assertFalse("codescan config must NOT be present", result.getCodeScan().isPresent()); }
@Test public void sechub_config4_json_file_from_json_has_codescanconfig_with_folders() throws Exception { String json = SharedKernelTestFileSupport.getTestfileSupport().loadTestFile("sechub_config4.json"); SecHubConfiguration result = SECHUB_CONFIG.fromJSON(json); assertTrue("codescan config must be present", result.getCodeScan().isPresent()); List<String> ips = result.getCodeScan().get().getFileSystem().get().getFolders(); assertTrue(ips.contains("src/main/java")); assertTrue(ips.contains("src/main/resources")); }