Page arguments - hook_menu
Path parts are passed to the menu callback function with a zero index as the first path part i.e. 

First url:
array(0 =&gt; 'test', 1 =&gt; '%id')

Second url: 
array(0 =&gt; 'test', 1 =&gt; 'new', 2 =&gt; '%new_id')

Your form function expects two arguments but you only ever give it one.

In your form function arguments, this: $id = NULL, $new_id = NULL corresponds to this array('my_module_form', first_argument, second_argument) in your menu callback args. So you are only ever giving your form function one argument from the menu.
Try this in your second menu item:

'page arguments' =&gt; array('my_module_form', 1, 2),


This will provide two arguments for the form callback function. Your first menu item will return null for $new_id, because you don't have further path parts to provide from the url.