restore invalidexception and rename test packages