Added tests for weight assignment by ID