@Test
public void testUIWhenSomeDataIsNull() {

    GuidanceManeuverData data = createData(0, null, null, null);
    // create proper data to see if everything is fine.
    mGuidanceManeuverView.setViewState(new GuidanceManeuverView.State(data));
    final TextView distanceView = (TextView) mGuidanceManeuverView.findViewById(R.id.distanceView);
    final TextView infoView1 = (TextView) mGuidanceManeuverView.findViewById(R.id.infoView1);
    final TextView infoView2 = (TextView) mGuidanceManeuverView.findViewById(R.id.infoView2);
    final ImageView iconView = (ImageView) mGuidanceManeuverView.findViewById(R.id.maneuverIconView);
    // null data should be hidden.
    assertEquals(distanceView.getVisibility(), View.GONE);
    assertEquals(infoView1.getVisibility(), View.GONE);
    assertEquals(infoView2.getVisibility(), View.GONE);
    assertEquals(iconView.getVisibility(), View.GONE);
}