Add test and extract model