@@ -0,0 +1,1233 @@
+package com.lenguyenthanh.nimble.view;%0A%0Aimport android.app.Activity;%0Aimport android.content.Context;%0Aimport android.content.ContextWrapper;%0Aimport junit.framework.Assert;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0A%0Aimport static org.mockito.Mockito.spy;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class ViewHelperTest %7B%0A  @Test%0A  public void testGetInstance() throws Exception %7B%0A    ViewHelper viewHelper = ViewHelper.getInstance();%0A    Assert.assertNotNull(viewHelper);%0A  %7D%0A%0A  @Test%0A  public void testGetActivity() throws Exception %7B%0A    Activity spy = spy(Activity.class);%0A    Activity result = ViewHelper.getInstance().getActivity(spy);%0A    Assert.assertEquals(result, spy);%0A  %7D%0A%0A  @Test%0A  public void getActivity_contextWrapper() throws Exception %7B%0A    Activity spy = spy(Activity.class);%0A    ContextWrapper wrapper = spy(new ContextWrapper(spy));%0A    when(wrapper.getBaseContext()).thenReturn(spy);%0A    Activity result = ViewHelper.getInstance().getActivity(wrapper);%0A    Assert.assertEquals(result, spy);%0A  %7D%0A%0A  @Test(expected = IllegalStateException.class)%0A  public void getActivity_exception() throws Exception %7B%0A    Context spy = Mockito.spy(Context.class);%0A    ViewHelper.getInstance().getActivity(spy);%0A  %7D%0A%7D%0A

Add test for ViewHelper