@Test
public void should_show_message_by_toast_when_given_message() throws Exception {

    Context context = mock(Context.class);
    ViewGroup group = mock(ViewGroup.class);
    Toast toast = mock(Toast.class);
    TextView textView = mock(TextView.class);
    Resources resources = mock(Resources.class);
    when(Toast.makeText(context, "", Toast.LENGTH_SHORT)).thenReturn(toast);
    when(toast.getView()).thenReturn(group);
    when(group.getChildAt(anyInt())).thenReturn(textView);
    when(context.getResources()).thenReturn(resources);
    when(resources.getDimension(anyInt())).thenReturn(0f);
    Utils.showMessageByToast(context, "", Toast.LENGTH_SHORT);
    verify(toast, times(1)).getView();
    verify(group, times(1)).getChildAt(anyInt());
    verify(context, times(1)).getResources();
    verify(resources, times(1)).getDimension(anyInt());
    verify(toast, times(1)).show();
    verify(textView, times(1)).setTextSize(anyFloat());
}