Cocoa rises to three-year high