InfiniteContainer: added tests and fixed functionality

- [x] @Aintaer