def METHOD_NAME():
    import os
    from nexus_base import nexus_noncore
    from physical_system import generate_physical_system
    from vasp_input import generate_vasp_input,VaspInput
    tpath = testing.setup_unit_test_output_directory('vasp_input','test_generate',divert=True)
    pseudo_dir = os.path.join(tpath,'pseudopotentials')
    nexus_noncore.pseudo_dir = pseudo_dir
    if not os.path.exists(pseudo_dir):
        os.makedirs(pseudo_dir)
    #end if
    open(os.path.join(pseudo_dir,'C.POTCAR'),'w').write(c_potcar_text)
    files = get_files()
    dia16 = generate_physical_system(
        structure = files['d16bulk.POSCAR'],
        C         = 4                  
        )
    vi = generate_vasp_input(      
        system       = dia16,            
        pseudos      = ['C.POTCAR'], 
        input_type   = 'generic',
        istart       = 0, 
        icharg       = 2,
        encut        = 450,
        nsw          = 5,
        ibrion       = 2,
        isif         = 2,
        kcenter      = 'monkhorst',
        kgrid        = (2,2,2),                
        kshift       = (0,0,0),              
        )
    assert(isinstance(vi,VaspInput))
    del vi.potcar.filepath
    check_vs_serial_reference(vi,'generate')
    restore_nexus()