StreamMetadataService { public int getAttributePosition(String streamName, String columnName) { return siddhiManager.getStreamDefinition(streamName).getAttributePosition(columnName); } StreamMetadataService(SiddhiManager siddhiManager); int getAttributePosition(String streamName, String columnName); Attribute getAttribute(String streamName, int columnOrder); byte[] getSnapshot(); void setSnapshot(byte[] snapshot);  }
@Test public void testGetAttributePosition() throws Exception { assertEquals("Expected value not found", 0, metadataService.getAttributePosition(StreamsHelper.STREAM_NAME, "name")); assertEquals("Expected value not found", 1, metadataService.getAttributePosition(StreamsHelper.STREAM_NAME, "timestamp")); assertEquals("Expected value not found", 2, metadataService.getAttributePosition(StreamsHelper.STREAM_NAME, "value")); }