Java Code Examples for org.apache.commons.collections.MapUtils#putAll()

The following examples show how to use org.apache.commons.collections.MapUtils#putAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccumuloGraphConfigurationTest.java    From vertexium with Apache License 2.0 6 votes vote down vote up
@Test
@SuppressWarnings("unchecked")
public void testBatchWriterConfigIsSetToValuesWithParameters() {
    int numThreads = 2;
    long timeout = 3;
    long maxMemory = 5;
    long maxLatency = 7;

    Map configMap = Maps.newHashMap();
    MapUtils.putAll(configMap, new String[]{
        AccumuloGraphConfiguration.BATCHWRITER_MAX_LATENCY, "" + maxLatency,
        AccumuloGraphConfiguration.BATCHWRITER_MAX_MEMORY, "" + maxMemory,
        AccumuloGraphConfiguration.BATCHWRITER_MAX_WRITE_THREADS, "" + numThreads,
        AccumuloGraphConfiguration.BATCHWRITER_TIMEOUT, "" + timeout});
    AccumuloGraphConfiguration accumuloGraphConfiguration = new AccumuloGraphConfiguration(configMap);
    BatchWriterConfig batchWriterConfig = accumuloGraphConfiguration.createBatchWriterConfig();

    assertThat(batchWriterConfig.getMaxLatency(TimeUnit.MILLISECONDS), is(maxLatency));
    assertThat(batchWriterConfig.getTimeout(TimeUnit.MILLISECONDS), is(timeout));
    assertThat(batchWriterConfig.getMaxMemory(), is(maxMemory));
    assertThat(batchWriterConfig.getMaxWriteThreads(), is(numThreads));
}
 
Example 2
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void updateIsNotNullableFieldThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "guid", "0002_0000000002", "system_type", null });
    try {
        ciService.update(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
        Assert.assertThat(((InvalidArgumentException) ex.getExceptionHolders()
                .get(0)
                .getException()).getArgumentName(), equalTo("system_type"));
    }
}
 
Example 3
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
@Ignore // isAuto field will be removed when updating
public void updateIsAutoFieldThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "guid", "0002_0000000002", "key_name", "mock_key_name" });
    try {
        ciService.update(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 4
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void addCiDataWithWrongCodeIdThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "name_en", "new system", "description", "new system desc", "system_type", 999 });
    try {
        ciService.create(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 5
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void updateInvalidCiRefThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "guid", "0002_0000000002", "description", "test desc", "name_en", "enName", "name_cn", "测试系统", "system_id", "0002_0000000999" });
    try {
        ciService.update(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 6
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void addCiDataWithWrongRefGuidThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "name_en", "new sub system", "description", "new sub system desc", "system_id", "999_0000001" });
    try {
        ciService.create(3, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 7
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void addCiDataWithDuplicatedNameThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "name_en", "Bank system", // duplicated
            "description", "duplicated name system", "system_type", 554 });
    try {
        ciService.create(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 8
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void addCiDataWithAutoFieldThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "name_en", "new Bank system", "description", "duplicated name system", "system_type", 554, "key_name", "system_bank_system" // auto
                                                                                                                                                                                                              // filled
                                                                                                                                                                                                              // field
    });
    try {
        ciService.create(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(false);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
        Assert.assertThat(((InvalidArgumentException) ex.getExceptionHolders()
                .get(0)
                .getException()).getArgumentName(), equalTo("key_name"));
    }
}
 
Example 9
Source File: InsertUpdateAction.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Override
public Map<String, Object> perform(EntityManager entityManager, int ciTypeId, String guid, AdmStateTransition transition, Map<String, Object> ciData, DynamicEntityHolder entityHolder, Date date) {
    Object ciBean = ciService.cloneCiAsParent(entityManager, ciTypeId, guid);
    entityHolder = new DynamicEntityHolder(entityHolder.getEntityMeta(), ciBean);

    entityHolder.update(ciData, CmdbThreadLocal.getIntance().getCurrentUser(), entityManager);
    Map<String, Object> updateMap = Maps.newHashMap();
    MapUtils.putAll(updateMap, new Object[] { CmdbConstants.DEFAULT_FIELD_STATE, transition.getTargetState(), CmdbConstants.DEFAULT_FIELD_FIXED_DATE, null });

    entityHolder.put(CmdbConstants.DEFAULT_FIELD_STATE, transition.getTargetState());
    entityHolder.put(CmdbConstants.DEFAULT_FIELD_FIXED_DATE, null);
    Object mergedObj = entityManager.merge(entityHolder.getEntityObj());

    entityManager.flush();
    Optional<AdmBasekeyCode> codeOpt = codeRepisotory.findById(transition.getTargetState());
    logger.info("Updating ci [{}] to state [{}({})]", guid, transition.getTargetState(), transition.getTargetState(), codeOpt.isPresent() ? codeOpt.get().getCode() : "");
    return ClassUtils.convertBeanToMap(mergedObj, ciService.getDynamicEntityMeta(ciTypeId), false);
}
 
Example 10
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Transactional
@Test
public void updateInvalidEnumCodeThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "guid", "0002_0000000001", "description", "test desc", "name_en", "enName", "name_cn", "测试系统", "system_type", 999 });
    try {
        ciService.update(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }

}
 
Example 11
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 6 votes vote down vote up
@Test
public void updateCiDataWithoutGuidThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "name_en", "new Bank system", "description", "duplicated name system", "system_type", 554, "key_name", "system_bank_system" // auto
                                                                                                                                                                                                              // filled
                                                                                                                                                                                                              // field
    });
    try {
        ciService.update(2, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 12
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 5 votes vote down vote up
@Test
public void addCiDataWithNotCreatedCiTypeThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "Mock_Attr_A", "mock system" });
    try {
        ciService.create(21, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
        Assert.assertThat(ex.getExceptionHolders()
                .get(0)
                .getException()
                .getClass(), equalTo(InvalidArgumentException.class));
    }
}
 
Example 13
Source File: HiveShellBaseTest.java    From HiveRunner with Apache License 2.0 5 votes vote down vote up
private HiveShell createHiveShell(CommandShellEmulator emulation, String... keyValues) {
    Map<String, String> hiveConf = MapUtils.putAll(new HashMap(), keyValues);
    HiveConf conf = createHiveconf(hiveConf);

    CLIService client = Mockito.mock(CLIService.class);

    container = Mockito.mock(HiveServerContainer.class);

    List<String> setupScripts = Arrays.asList();
    List<HiveResource> hiveResources = Arrays.asList();
    List<Script> scriptsUnderTest = Arrays.asList();

    return new HiveShellBase(container, hiveConf, setupScripts, hiveResources, scriptsUnderTest, emulation);
}
 
Example 14
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 5 votes vote down vote up
@Transactional
@Test
public void addCiDataToDecomissionedCiTypeThenThrowException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "capacity", 10 });
    try {
        ciService.create(18, ImmutableList.of(ciDataMap));
        Assert.assertFalse(true);// should not be reached
    } catch (BatchChangeException ex) {
        Assert.assertThat(ex.getExceptionHolders()
                .size(), greaterThan(0));
    }
}
 
Example 15
Source File: RequestParameterTest.java    From oauth2-server with Apache License 2.0 5 votes vote down vote up
private Request createRequestMock(String[] values) {
	Map<String, String> parameterMap = new HashMap<String, String>();
	MapUtils.putAll(parameterMap, values);
	Request request = createMock(Request.class);
	expect(request.getParameterMap()).andReturn(parameterMap);
	replay(request);
	return request;
}
 
Example 16
Source File: UpdateAction.java    From we-cmdb with Apache License 2.0 5 votes vote down vote up
@Override
public Map<String, Object> perform(EntityManager entityManager, int ciTypeId, String guid, AdmStateTransition transition, Map<String, Object> ciData, DynamicEntityHolder entityHolder, Date date) {
    Map<String, Object> updateMap = Maps.newHashMap(ciData);
    MapUtils.putAll(updateMap, new Object[] { CmdbConstants.DEFAULT_FIELD_STATE, transition.getTargetState() });

    if (entityHolder == null) {
        entityHolder = ciService.getCiHolder(ciTypeId, guid);
    }
    entityHolder.update(updateMap, CmdbThreadLocal.getIntance().getCurrentUser(), entityManager);
    Object mergedObj = entityManager.merge(entityHolder.getEntityObj());
    return ClassUtils.convertBeanToMap(mergedObj, entityHolder.getEntityMeta(), false);
}
 
Example 17
Source File: ConfirmAction.java    From we-cmdb with Apache License 2.0 5 votes vote down vote up
@Override
public Map<String, Object> perform(EntityManager entityManager, int ciTypeId, String guid, AdmStateTransition transition, Map<String, Object> ciData, DynamicEntityHolder ciHolder, Date date) {
    SimpleDateFormat dateFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    dateFmt.setTimeZone(TimeZone.getDefault());
    if (ciHolder == null) {
        ciHolder = ciService.getCiHolder(ciTypeId, guid);
    }
    String fixedDate = (String) ciHolder.get(CmdbConstants.DEFAULT_FIELD_FIXED_DATE);
    if (!Strings.isNullOrEmpty(fixedDate)) {
        throw new InvalidArgumentException(String.format("The Ci [%s] has been confirmed, can not be confirmed again.", guid));
    }
    if(date != null) {
        fixedDate = dateFmt.format(date);
        
    }else {
        fixedDate = dateFmt.format(new Date());
        
    }
    Map<String, Object> updateMap = Maps.newHashMap();
    int targetState = transition.getTargetState();
    MapUtils.putAll(updateMap, new Object[] { CmdbConstants.GUID, guid, CmdbConstants.DEFAULT_FIELD_FIXED_DATE, fixedDate, CmdbConstants.DEFAULT_FIELD_STATE, targetState });

    ciHolder.update(updateMap, CmdbThreadLocal.getIntance().getCurrentUser(), entityManager);

    entityManager.merge(ciHolder.getEntityObj());
    logger.info("Update fixed_date to {} on ci [{}:{}]", fixedDate, ciTypeId, guid);
    return ClassUtils.convertBeanToMap(ciHolder.getEntityObj(), ciHolder.getEntityMeta(), false);
}
 
Example 18
Source File: CiServiceImplLegacyModelTest.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@Test(expected = BatchChangeException.class)
public void addCiDataWithNotCreatedAttrThenGetException() {
    Map<String, Object> ciDataMap = MapUtils.putAll(new HashMap(), new Object[] { "Mock_Attr_A", "mock system" });
    ciService.create(23, ImmutableList.of(ciDataMap));
}
 
Example 19
Source File: ApiV2ControllerMultReferenceTest.java    From we-cmdb with Apache License 2.0 4 votes vote down vote up
@Test
public void createAndUpdateCiDataForMultSelectionCiTypeThenReturnSucessfully() throws Exception {
    mvc.perform(post("/api/v2/ciTypes/apply").contentType(MediaType.APPLICATION_JSON)
            .content("[51,50]"))
            .andExpect(jsonPath("$.statusCode", is("OK")));

    Map<?, ?> jsonMap = ImmutableMap.builder()
            .put("description", "multi selection ci data")
            .put("mul_select", Lists.newArrayList(47, 48))
            .build();
    String reqJson = JsonUtil.toJson(ImmutableList.of(jsonMap));
    int ciTypeId = 50;
    // creation
    mvc.perform(post("/api/v2/ci/{ciTypeId}/create", ciTypeId).contentType(MediaType.APPLICATION_JSON)
            .content(reqJson))
            .andExpect(jsonPath("$.statusCode", is("OK")))
            .andExpect(jsonPath("$.data[0].guid", notNullValue()));

    QueryRequestUtils queryObject = new QueryRequestUtils();
    queryObject.withPagable(0, 10);
    reqJson = JsonUtil.toJsonString(queryObject);

    // query
    MvcResult mvcResult = mvc.perform(post("/api/v2/ci/{ciTypeId}/retrieve", ciTypeId).contentType(MediaType.APPLICATION_JSON)
            .content(reqJson))
            .andExpect(jsonPath("$.statusCode", is("OK")))
            .andReturn();
    String retContent = mvcResult.getResponse()
            .getContentAsString();
    assertThat(JsonUtil.asNodeByPath(retContent, "/data/contents")
            .size(), equalTo(1));
    assertThat(JsonUtil.asNodeByPath(retContent, "/data/contents/0/data/mul_select")
            .size(), equalTo(2));
    String guidA = JsonUtil.asNodeByPath(retContent, "/data/contents/0/data/guid")
            .asText();

    // update
    jsonMap = Maps.newHashMap();
    MapUtils.putAll(jsonMap, new Object[] { "guid", guidA, "mul_select", Lists.newArrayList(47) });

    String updateJson = JsonUtil.toJson(ImmutableList.of(jsonMap));

    mvc.perform(post("/api/v2/ci/{ciTypeId}/update", ciTypeId).contentType(MediaType.APPLICATION_JSON)
            .content(updateJson))
            .andExpect(jsonPath("$.statusCode", is("OK")));

    mvcResult = mvc.perform(post("/api/v2/ci/{ciTypeId}/retrieve", ciTypeId).contentType(MediaType.APPLICATION_JSON)
            .content(reqJson))
            .andExpect(jsonPath("$.statusCode", is("OK")))
            .andReturn();
    retContent = mvcResult.getResponse()
            .getContentAsString();
    assertThat(JsonUtil.asNodeByPath(retContent, "/data/contents/0/data/mul_select")
            .size(), equalTo(1));
}
 
Example 20
Source File: MafOutputRendererUnitTest.java    From gatk with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@DataProvider
private Object[][] provideForTestReplaceFuncotationValuesWithMafCompliantValues() {
    return new Object[][] {
            // Empty maps:
            {
                new HashMap<>(),
                new LinkedHashMap<>()
            },
            // Singleton map that doesn't contain a replaceable element:
            {
                    MapUtils.putAll(new HashMap<String, Object>(),
                            new Object[][] {
                                    {"Unreplaceable_Key", "Unreplaceable_Value"},
                            }
                    ),
                    MapUtils.putAll(new LinkedHashMap<String, String>(),
                            new Object[][] {
                                    {"Unreplaceable_Key", "Unreplaceable_Value"},
                            }
                    )
            },
            // Map with multiple elements, none of which are replaced:
            {
                    MapUtils.putAll(new HashMap<String, Object>(),
                            new Object[][] {
                                    {"Unreplaceable_Key1", "Unreplaceable_Value1"},
                                    {"Unreplaceable_Key2", "Unreplaceable_Value2"},
                            }
                    ),
                    MapUtils.putAll(new LinkedHashMap<String, String>(),
                            new Object[][] {
                                    {"Unreplaceable_Key1", "Unreplaceable_Value1"},
                                    {"Unreplaceable_Key2", "Unreplaceable_Value2"},
                            }
                    )
            },
            // Singleton map containing a replaced value:
            {
                    MapUtils.putAll(new HashMap<String, Object>(),
                            new Object[][] {
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_RAW_NAMES },
                            }
                    ),
                    MapUtils.putAll(new LinkedHashMap<String, String>(),
                            new Object[][] {
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_MAF_READY_NAMES.replaceAll(VcfOutputRenderer.OTHER_TRANSCRIPT_DELIMITER, MafOutputRendererConstants.OTHER_TRANSCRIPT_DELIMITER)},
                            }
                    )
            },
            // Map with multiple elements, some of which are replaced:
            {
                    MapUtils.putAll(new HashMap<String, Object>(),
                            new Object[][] {
                                    {"Unreplaceable_Key1", "Unreplaceable_Value1"},
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_RAW_NAMES },
                            }
                    ),
                    MapUtils.putAll(new LinkedHashMap<String, String>(),
                            new Object[][] {
                                    {"Unreplaceable_Key1", "Unreplaceable_Value1"},
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_MAF_READY_NAMES.replaceAll(VcfOutputRenderer.OTHER_TRANSCRIPT_DELIMITER, MafOutputRendererConstants.OTHER_TRANSCRIPT_DELIMITER)},
                            }
                    )
            },
            // Map with multiple elements, all of which are replaced:
            {
                    MapUtils.putAll(new HashMap<String, Object>(),
                            new Object[][] {
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_RAW_NAMES },
                                    { MafOutputRendererConstants.FieldName_Variant_Type,      GencodeFuncotation.VariantType.INS.toString() },
                                    { MafOutputRendererConstants.FieldName_Reference_Allele,  "A" },
                                    { MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1, "A" },
                                    { MafOutputRendererConstants.FieldName_Tumor_Seq_Allele2, "AT" },
                                    { MafOutputRendererConstants.FieldName_Start_Position,    "100" },
                                    { MafOutputRendererConstants.FieldName_End_Position,      "100" },
                            }
                    ),
                    MapUtils.putAll(new LinkedHashMap<String, String>(),
                            new Object[][] {
                                    { MafOutputRendererConstants.FieldName_Other_Transcripts, OTHER_TRANSCRIPTS_MAF_READY_NAMES.replaceAll(VcfOutputRenderer.OTHER_TRANSCRIPT_DELIMITER, MafOutputRendererConstants.OTHER_TRANSCRIPT_DELIMITER)},
                                    { MafOutputRendererConstants.FieldName_Variant_Type,      GencodeFuncotation.VariantType.INS.toString() },
                                    { MafOutputRendererConstants.FieldName_Reference_Allele,  "-" },
                                    { MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1, "-" },
                                    { MafOutputRendererConstants.FieldName_Tumor_Seq_Allele2, "T" },
                                    { MafOutputRendererConstants.FieldName_Start_Position,    "100" },
                                    { MafOutputRendererConstants.FieldName_End_Position,      "101" },
                            }
                    )
            }
    };
}