Details of probability class. Move shared test code to helpers file