@@ -0,0 +1,1706 @@
+package com.farmerbb.taskbar.util;%0A%0Aimport android.content.Context;%0A%0Aimport androidx.test.core.app.ApplicationProvider;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class TopAppsTest %7B%0A    private Context context;%0A    private TopApps topApps;%0A%0A    @Before%0A    public void setUp() %7B%0A        context = ApplicationProvider.getApplicationContext();%0A        topApps = TopApps.getInstance(context);%0A    %7D%0A%0A    @Test%0A    public void testGetInstance() %7B%0A        assertNotNull(topApps);%0A        for (int i = 1; i %3C= 20; i++) %7B%0A            assertEquals(topApps, TopApps.getInstance(context));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testIsTopApp() %7B%0A        assertFalse(topApps.isTopApp(context.getPackageName()));%0A        addCurrentPackageToTopApps();%0A        assertTrue(topApps.isTopApp(context.getPackageName()));%0A        topApps.removeTopApp(context, context.getPackageName());%0A    %7D%0A%0A    @Test%0A    public void testRemoveTopApp() %7B%0A        addCurrentPackageToTopApps();%0A        assertTrue(topApps.isTopApp(context.getPackageName()));%0A        topApps.removeTopApp(context, context.getPackageName());%0A        assertFalse(topApps.isTopApp(context.getPackageName()));%0A    %7D%0A%0A    private void addCurrentPackageToTopApps() %7B%0A        String packageName = context.getPackageName();%0A        BlacklistEntry entry = new BlacklistEntry(packageName, packageName);%0A        topApps.addTopApp(context, entry);%0A    %7D%0A%7D

Add unit tests for TopApps