Brussels says China is acting illegally in a dispute with Lithuania, one of the EU's smallest states.