Added generic gateway and a simple test with it