@Test
public void testGetOrderedValues() throws Exception {

    List<ColumnNameTypeValue> columns = new ArrayList<>();
    columns.add(new ColumnNameTypeValue("myAttr", ColumnType.STRING, "test"));
    columns.add(new ColumnNameTypeValue("myAttr2", ColumnType.BOOLEAN, true));
    columns.add(new ColumnNameTypeValue("myAttr3", ColumnType.DOUBLE, 3.1));
    StreamDefinition definition= Mockito.mock(StreamDefinition.class);
    when(definition.getAttributeList()).thenReturn(listAttributes);
    when(definition.getAttributePosition("myAttr")).thenReturn(0);
    when(definition.getAttributePosition("myAttr2")).thenReturn(1);
    when(definition.getAttributePosition("myAttr3")).thenReturn(2);
    doReturn(Attribute.Type.STRING).when(definition).getAttributeType("myAttr");
    doReturn(Attribute.Type.BOOL).when(definition).getAttributeType("myAttr2");
    doReturn(Attribute.Type.DOUBLE).when(definition).getAttributeType("myAttr3");
    Object[] result= SiddhiUtils.getOrderedValues(definition, columns);
    assertEquals("Unexpected columns size", 6, result.length);
}