Press [Alt+Ctrl+O] in some place of groovy file and optimize imports of this file or in the directory of this file

Before optimization code look like

 
 

After optimization code looks