String stack implemented in 2 different way with junit tests