@Test
public void testDecode() throws Exception {

    assertEquals("Unexpected result", "text", SiddhiUtils.decodeSiddhiValue("text", Attribute.Type.STRING));
    assertEquals("Unexpected result", true, SiddhiUtils.decodeSiddhiValue("true", Attribute.Type.BOOL));
    assertEquals("Unexpected result", 12.1, SiddhiUtils.decodeSiddhiValue("12.1", Attribute.Type.DOUBLE));
    assertEquals("Unexpected result", 12, SiddhiUtils.decodeSiddhiValue("12", Attribute.Type.INT));
    assertEquals("Unexpected result", 7L, SiddhiUtils.decodeSiddhiValue("7", Attribute.Type.LONG));
    assertEquals("Unexpected result", 22f, SiddhiUtils.decodeSiddhiValue("22", Attribute.Type.FLOAT));
    Double d= 22d;
    assertEquals("Unexpected result", "22.0", SiddhiUtils.decodeSiddhiValue(d, Attribute.Type.STRING));
    assertEquals("Unexpected result", d, SiddhiUtils.decodeSiddhiValue(d, Attribute.Type.DOUBLE));
    assertEquals("Unexpected result", 22, SiddhiUtils.decodeSiddhiValue(d, Attribute.Type.INT));
    assertEquals("Unexpected result", 22L, SiddhiUtils.decodeSiddhiValue(d, Attribute.Type.LONG));
    assertEquals("Unexpected result", 22f, SiddhiUtils.decodeSiddhiValue(d, Attribute.Type.FLOAT));
}