/*
 * Copyright 2016 Victor Albertos
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package app.presentation.sections.launch;

import app.presentation.foundation.widgets.Notifications;
import app.presentation.foundation.presenter.ViewPresenter;
import app.presentation.foundation.transformations.Transformations;
import app.presentation.sections.TransformationsMock;
import io.reactivex.Completable;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

public final class LaunchPresenterTest {
  @Rule public MockitoRule mockitoRule = MockitoJUnit.rule();
  Transformations transformations = Mockito.spy(TransformationsMock.class);
  private LaunchPresenter launchPresenterUT;
  @Mock LaunchWireframe wireframe;
  @Mock ViewPresenter view;
  @Mock Notifications notifications;

  @Before public void init() {
    launchPresenterUT = new LaunchPresenter(transformations, wireframe,
        notifications);
  }

  @Test public void Verify_OnBindView() {
    when(wireframe.dashboard()).thenReturn(Completable.complete());
    launchPresenterUT.onBindView(view);

    verify(wireframe).dashboard();
  }
}

@@ -675,89 +675,39 @@
 ion.
-widgets.Notifications;%0Aimport app.presentation.foundation.presenter.ViewPresenter
+transformations.Transformations
 ;%0Aim
@@ -743,33 +743,23 @@
 ion.
-transformations.Transform
+widgets.Notific
 atio
@@ -1401,20 +1401,22 @@
   @Mock 
-View
+Launch
 Presente
@@ -1416,16 +1416,21 @@
 resenter
+.View
  view;%0A 

fix test