datastructure and junit tests