def METHOD_NAME(run_command_patch, popen_patch):
    class MockProc():
        commandline = "boot_next"
        def communicate(self):
            return MockProc.commandline, None
    def mock_run_command(cmd):
        # Remove leading string "/usr/bin/fw_setenv boot_next " -- the 29 characters
        cmd = ' '.join(cmd)
        MockProc.commandline = cmd[29:]
    run_command_patch.side_effect = mock_run_command
    popen_patch.return_value = MockProc()
    bootloader = uboot.UbootBootloader()
    bootloader.get_installed_images = Mock(return_value=installed_images)
    bootloader.set_default_image(installed_images[1])
    # Verify get_next_image was executed with image path
    next_image=bootloader.get_next_image()
    assert next_image == installed_images[1]