We consider the problem of testing whether two distributions are similar or significantly different, given sequences generated \emph{i.i.d.} and independently according to them. The problem is related to classification, where we are given training sequences from several classes and a test sequence from one of these classes, and we want to decide the class to which the test sequence belongs. For the closeness testing problem, we show ratio tests based on the maximum likelihood of patterns of the two sequences which can distinguish whether the distributions generating them are same or significantly different with low error probability, whenever there exists % any = some a test that can do so. We make no assumptions on the size of the alphabet of the distributions or the structure of the distributions. The results can be extended to the problem of classification.