@Test
public void thatHideSoftwareKeyboard(){

    View view =  mock(View.class);
    InputMethodManager inputMethodManager = mock(InputMethodManager.class);
    when(view.getContext()).thenReturn(mContext);
    when(mContext.getSystemService(Activity.INPUT_METHOD_SERVICE)).thenReturn(inputMethodManager);
    when(inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0)).thenReturn(true);
    HaloUtils.hideKeyboard(view);
    assertThat(inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0)).isTrue();
}