A Spanish energy firm that deducted pay from workers cigarette and coffee breaks wins a court case.