OPropertyIndexDefinition extends ODocumentWrapperNoClass implements OIndexDefinition { public Object createValue(final List<?> params) { return OType.convert(params.get(0), keyType.getDefaultJavaType()); } OPropertyIndexDefinition(final String iClassName, final String iField, final OType iType);  OPropertyIndexDefinition(); String getClassName(); List<String> getFields(); List<String> getFieldsToIndex(); Object getDocumentValueToIndex(final ODocument iDocument); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); Object createValue(final List<?> params); Object createValue(final Object... params); int getParamCount(); OType[] getTypes(); @Override final ODocument toStream(); String toCreateIndexDDL(final String indexName, final String indexType);  }
@Test public void testCreateValueSingleParameter() { final Object result = propertyIndex.createValue(Collections.singletonList("12")); Assert.assertEquals(result, 12); }
@Test public void testCreateValueTwoParameters() { final Object result = propertyIndex.createValue(Arrays.asList("12", "25")); Assert.assertEquals(result, 12); }
@Test public void testCreateValueWrongParameter() { final Object result = propertyIndex.createValue(Collections.singletonList("tt")); Assert.assertNull(result); }
@Test public void testCreateValueSingleParameterArrayParams() { final Object result = propertyIndex.createValue("12"); Assert.assertEquals(result, 12); }
@Test public void testCreateValueTwoParametersArrayParams() { final Object result = propertyIndex.createValue("12", "25"); Assert.assertEquals(result, 12); }
@Test public void testCreateValueWrongParameterArrayParams() { final Object result = propertyIndex.createValue("tt"); Assert.assertNull(result); }