Add test modules for nifty and optimizer