rewritten test using reflection for private method