Firstly you forgot the semicolon at the end of this line
public static final RegistryObject<Item> TESTITEM = ITEMS.register("testitem", () -> new TestItem(new Item.Properties()))
The second thing:
In this line here:
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
You are using the variable MODID but you have never created it.
You need to create it like this:
public static final String MODID = "<your modid>";
Then it should work