Why are my sidebars not registering in unit tests

First, you can (should?) register sidebars generally, there’s no need for a specific hook (and widgets_init might not be the best one). Second, you don’t need to specify IDs, as they are generated automatically. You can, of course, but there’s also no need to.

Just put the following in your functions.php:

register_sidebar( array(
    'name' => __( 'Sidebar 1', 'fp' ),
    // 'id' => 'sidebar1',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h4 class="widget-title">',
    'after_title' => '</h4>',
) );

register_sidebar( array(
    'name' => __( 'Sidebar 2', 'fp' ),
    // 'id' => 'sidebar2',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h4 class="widget-title">',
    'after_title' => '</h4>',
) );

To check the current widgets for all registered sidebars (as well as the inactive etc.), just do the following:

$sidebars = wp_get_sidebars_widgets();
echo '<pre>'.print_r($sidebars, true).'</pre>';

And to check for a given sidebar ID, you can do (as you did):

if (array_key_exists('sidebar1', $sidebars))
    echo 'Sidebar 1 is registered.';

To your question regarding old sidebars. As long as there are widgets in a sidebar, they are stored (as an array) for the according sidebar ID. If you want to share sidebar-widgets settings between themes, you have to register the same sidebar( ID)s.