refactor test to use public interface instead of protected data by reflection