North Korea says it has successfully tested an engine designed for an intercontinental ballistic missile.