change getXStream public to protected and add test