tests: add rosenbrock test
chore: guard test imports by #[cfg(test)]
chore: split types and functions to separate module files