import junit.framework.TestCase;
public class WeightedResourceTest extends TestCase {
public void testEquality() {
WeightedResource lr1 = new WeightedResource(0, null, 0, WeightedResource.WEIGHT_NONE);
WeightedResource lr2 = new WeightedResource(0, null, 0, WeightedResource.WEIGHT_NONE);
// expect same objects to be equal
assertTrue(lr1.equals(lr1));
// expect different instances to not be equal
assertFalse(lr1.equals(lr2));
assertFalse(lr2.equals(lr1));
assertFalse(lr1.equals(null));
assertFalse(lr2.equals(null));
}