Split out test wrapper from parsing functionality