@Test public void testresetUMLArrowsValues() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { UMLArrows arrows = UMLArrows.getInstance(); // Get the fields // //Whitelist is not reset in Reset Arrows, since it is consistent // //between all class in UML // Field whitelist = // WorkerForArrows.class.getDeclaredField("whitelist"); // whitelist.setAccessible(true); Field supers = UMLArrows.class.getDeclaredField("supers"); supers.setAccessible(true); Field interfaces = UMLArrows.class.getDeclaredField("interfaces"); interfaces.setAccessible(true); Field uses = UMLArrows.class.getDeclaredField("uses"); uses.setAccessible(true); Field fields = UMLArrows.class.getDeclaredField("fields"); fields.setAccessible(true); // Set the values // whitelist.set(arrows,new ArrayList<String>(Arrays.asList( // "String", "cóol", "Understood"))); supers.set(arrows, "This is a cool String"); interfaces.set( arrows, new ArrayList<String>(Arrays.asList("Looks interesting", "cóol", "Understood"))); uses.set(arrows, new ArrayList<String>(Arrays.asList("String", "cóol", "Testing123"))); fields.set(arrows, new ArrayList<String>(Arrays.asList("Helllllo", "cóol", "Mic Check?"))); // Reset arrows.resetUMLArrows(); // Test // assertEquals(whitelist.get(arrows), new ArrayList<String>()); assertEquals("", supers.get(arrows)); assertEquals(new ArrayList<String>(), interfaces.get(arrows)); assertEquals(new ArrayList<String>(), uses.get(arrows)); assertEquals(new ArrayList<String>(), fields.get(arrows)); }