@Test
public void convert_complex_data_type_to_property_value() throws Exception {

    PropertyDefinition propertyDefinition = new PropertyDefinition();
    propertyDefinition.setType("alien.nodes.test.ComplexDataType");
    PropertyValue propertyValue = converter.toPropertyValue(
            ImmutableMap.of(
                    "nested", "nested value",
                    "nested_array", Arrays.asList("item1", "item2", "item3"),
                    "nested_map", ImmutableMap.of("key1", "value1", "key2", "value2")
            ), propertyDefinition);
    assertThat(propertyValue).isInstanceOf(ComplexPropertyValue.class);
    ComplexPropertyValue complexPropertyValue = (ComplexPropertyValue) propertyValue;
    assertThat(complexPropertyValue.getValue().get("nested_map")).isEqualTo(ImmutableMap.of("key1", "value1", "key2", "value2"));
    assertThat(complexPropertyValue.getValue().get("nested_array")).isEqualTo(Arrays.asList("item1", "item2", "item3"));
    assertThat(complexPropertyValue.getValue().get("nested")).isEqualTo("nested value");
}