Using contracts package for testing