View Javadoc

1   /*
2    JavaProgrammingLanguageContextTest.java
3    Creation date : 2/09/2010
4    Copyright © Benjamin Croizet (graffity2199@yahoo.fr)
5   
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    or GNU Lesser General Public License as published by the
9    Free Software Foundation; either version 3 of the License,
10   or (at your option) any later version.
11  
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16  
17   You should have received copies of the GNU General Public License
18   and GNU Lesser General Public License along with this program;
19   if not, write to the Free Software Foundation, Inc.,
20   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21   http://www.fsf.org/licensing/licenses/gpl.html
22   http://www.gnu.org/licenses/lgpl.html
23   */
24  
25  package net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl;
26  
27  import static java.util.Arrays.asList;
28  import static java.util.regex.Pattern.compile;
29  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN;
30  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN;
31  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyConstants.DEFAULT_DISPLAY_TYPES_OPTIONS;
32  import static net.sourceforge.plantumldependency.cli.constants.PlantUMLDependencyDisplaySetTestConstants.DISPLAY_TYPE_SET3;
33  import static net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType.ABSTRACT_CLASSES;
34  import static net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType.DISPLAY_TYPES_OPTIONS;
35  import static net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImplTest.PLANTUML_CLASSES_DIAGRAM_TEST2;
36  import static org.junit.Assert.assertEquals;
37  import static org.junit.Assert.assertNotNull;
38  import static org.junit.Assert.assertNull;
39  import static org.junit.Assert.assertTrue;
40  
41  import java.util.TreeSet;
42  
43  import net.sourceforge.plantumldependency.cli.generic.GenericDependency;
44  import net.sourceforge.plantumldependency.cli.generic.impl.GenericDependencyImpl;
45  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.PlantUMLClassesDiagramElement;
46  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.element.impl.PlantUMLClassesDiagramClassElementImpl;
47  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.impl.PlantUMLClassesDiagramImpl;
48  import net.sourceforge.plantumldependency.cli.plantumldiagram.classes.relation.PlantUMLClassesDiagramRelation;
49  import net.sourceforge.plantumldependency.common.ComparableAndDeepCloneableObjectTest;
50  
51  import org.junit.Test;
52  import org.junit.experimental.theories.DataPoint;
53  
54  /**
55   * JUnit test classes for {@link JavaProgrammingLanguageContext}.
56   *
57   * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>)
58   * @since 1.0.0
59   * @version 1.4.0
60   */
61  public class JavaProgrammingLanguageContextTest extends
62          ComparableAndDeepCloneableObjectTest < JavaProgrammingLanguageContextTest > {
63  
64      /** Java programming language test 1 instance. */
65      @DataPoint
66      public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT1 = new JavaProgrammingLanguageContext();
67  
68      /** Java programming language test 2 instance. */
69      @DataPoint
70      public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT2 = new JavaProgrammingLanguageContext(
71              new TreeSet < GenericDependency >(asList(new GenericDependency[] {
72                      new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
73                              "net.sourceforge.plantumldependency.main.option.programminglanguage"),
74                      new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
75              DEFAULT_DISPLAY_TYPES_OPTIONS, DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN,
76              DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
77  
78      /** Java programming language test 3 instance. */
79      @DataPoint
80      public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT3 = new JavaProgrammingLanguageContext(
81              new TreeSet < GenericDependency >(asList(new GenericDependency[] {
82                      new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
83                              "net.sourceforge.plantumldependency.main.option.programminglanguage"),
84                      new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
85              DISPLAY_TYPE_SET3, DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN, DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
86  
87      /** Java programming language test 4 instance. */
88      @DataPoint
89      public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT4 = new JavaProgrammingLanguageContext(
90              new TreeSet < GenericDependency >(asList(new GenericDependency[] {
91                      new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
92                              "net.sourceforge.plantumldependency.main.option.programminglanguage"),
93                      new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
94              new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
95                      "GenericDependency", "net.sourceforge.plantumldependency.generic")})),
96              new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
97                      "TestReadDependencyFromFileInterfaceWithoutPackage",
98                      "net.sourceforge.plantumldependency.main.option.programminglanguage")})), DISPLAY_TYPES_OPTIONS,
99              DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN, DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
100 
101     /** Java programming language test 5 instance. */
102     @DataPoint
103     public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT5 = new JavaProgrammingLanguageContext(
104             new TreeSet < GenericDependency >(asList(new GenericDependency[] {
105                     new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
106                             "net.sourceforge.plantumldependency.main.option.programminglanguage"),
107                     new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
108             new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
109                     "GenericDependency", "net.sourceforge.plantumldependency.generic")})), DISPLAY_TYPES_OPTIONS,
110             DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN, DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
111 
112     /** Java programming language test 6 instance. */
113     @DataPoint
114     public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT6 = new JavaProgrammingLanguageContext(
115             new TreeSet < GenericDependency >(asList(new GenericDependency[] {
116                     new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
117                             "net.sourceforge.plantumldependency.main.option.programminglanguage"),
118                     new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
119             DEFAULT_DISPLAY_TYPES_OPTIONS, compile(".*main.*"), DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
120 
121     /** Java programming language test 7 instance. */
122     @DataPoint
123     public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT7 = new JavaProgrammingLanguageContext(
124             new TreeSet < GenericDependency >(asList(new GenericDependency[] {
125                     new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
126                             "net.sourceforge.plantumldependency.main.option.programminglanguage"),
127                     new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
128             new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
129                     "GenericDependency", "net.sourceforge.plantumldependency.generic")})),
130             new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
131                     "TestReadDependencyFromFileInterfaceWithoutPackage",
132                     "net.sourceforge.plantumldependency.main.option.programminglanguage")})), DISPLAY_TYPES_OPTIONS,
133             DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN, compile(".*Package"));
134 
135     /** Java programming language test 8 instance. */
136     @DataPoint
137     public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT8 = new JavaProgrammingLanguageContext();
138 
139     /** Java programming language test 9 instance. */
140     @DataPoint
141     public static final JavaProgrammingLanguageContext JAVA_PROGRAMMING_LANGUAGE_CONTEXT9 = null;
142 
143     /**
144      * Test method for
145      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addParsedAndSeenDependencies(GenericDependency)}
146      * .
147      */
148     @Test
149     public void testAddParsedAndSeenDependenciesWithExistingDependency() {
150         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
151                 .deepClone();
152         javaProgrammingLanguageContext.addParsedAndSeenDependencies(new GenericDependencyImpl(
153                 "TestReadDependencyFromFileInterfaceWithoutPackage",
154                 "net.sourceforge.plantumldependency.main.option.programminglanguage"));
155         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
156         assertEquals(2, javaProgrammingLanguageContext.getParsedDependencies().size());
157     }
158 
159     /**
160      * Test method for
161      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addParsedAndSeenDependencies(GenericDependency)}
162      * .
163      */
164     @Test
165     public void testAddParsedAndSeenDependenciesWithNotExistingDependency() {
166         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
167                 .deepClone();
168         javaProgrammingLanguageContext.addParsedAndSeenDependencies(new GenericDependencyImpl("DeepCloneable",
169                 "net.sourceforge.mazix.components.clone"));
170         assertEquals(3, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
171         assertEquals(3, javaProgrammingLanguageContext.getParsedDependencies().size());
172     }
173 
174     /**
175      * Test method for
176      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addPotentialJavaLangSeenDependencies(GenericDependency)}
177      * .
178      */
179     @Test
180     public void testAddPotentialJavaLangSeenDependenciesWithExistingDependency() {
181         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT4
182                 .deepClone();
183         javaProgrammingLanguageContext.addPotentialJavaLangSeenDependencies(new GenericDependencyImpl(
184                 "TestReadDependencyFromFileInterfaceWithoutPackage",
185                 "net.sourceforge.plantumldependency.main.option.programminglanguage"));
186         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
187         assertEquals(1, javaProgrammingLanguageContext.getPotentialJavaLangSeenDependencies().size());
188     }
189 
190     /**
191      * Test method for
192      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addPotentialJavaLangSeenDependencies(GenericDependency)}
193      * .
194      */
195     @Test
196     public void testAddPotentialJavaLangSeenDependenciesWithNotExistingDependency() {
197         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT4
198                 .deepClone();
199         javaProgrammingLanguageContext.addPotentialJavaLangSeenDependencies(new GenericDependencyImpl("DeepCloneable",
200                 "net.sourceforge.mazix.components.clone"));
201         assertEquals(3, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
202         assertEquals(2, javaProgrammingLanguageContext.getPotentialJavaLangSeenDependencies().size());
203     }
204 
205     /**
206      * Test method for
207      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addParsedAndSeenDependencies(GenericDependency)}
208      * .
209      */
210     @Test
211     public void testAddSeenDependenciesWithExistingDependency() {
212         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
213                 .deepClone();
214         javaProgrammingLanguageContext.addSeenDependencies(new GenericDependencyImpl(
215                 "TestReadDependencyFromFileInterfaceWithoutPackage",
216                 "net.sourceforge.plantumldependency.main.option.programminglanguage"));
217         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
218         assertEquals(2, javaProgrammingLanguageContext.getParsedDependencies().size());
219     }
220 
221     /**
222      * Test method for
223      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#addParsedAndSeenDependencies(GenericDependency)}
224      * .
225      */
226     @Test
227     public void testAddSeenDependenciesWithNotExistingDependency() {
228         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
229                 .deepClone();
230         javaProgrammingLanguageContext.addSeenDependencies(new GenericDependencyImpl("DeepCloneable",
231                 "net.sourceforge.mazix.components.clone"));
232         assertEquals(3, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
233         assertEquals(2, javaProgrammingLanguageContext.getParsedDependencies().size());
234     }
235 
236     /**
237      * Test method for
238      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getParsedAndSeenDependencies()}
239      * .
240      */
241     @Test
242     public void testGetAllDependencies() {
243         assertEquals(2, JAVA_PROGRAMMING_LANGUAGE_CONTEXT2.getParsedAndSeenDependencies().size());
244     }
245 
246     /**
247      * Test method for
248      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getParsedOrSeenDependency(java.lang.String)}
249      * .
250      */
251     @Test
252     public void testGetParsedOrSeenDependencyWithExistingDependency() {
253         assertEquals(
254                 new GenericDependencyImpl("TestReadDependencyFromFileInterfaceWithoutPackage",
255                         "net.sourceforge.plantumldependency.main.option.programminglanguage"),
256                 JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
257                         .getParsedOrSeenDependency("net.sourceforge.plantumldependency.main.option.programminglanguage.TestReadDependencyFromFileInterfaceWithoutPackage"));
258     }
259 
260     /**
261      * Test method for
262      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getParsedOrSeenDependency(java.lang.String)}
263      * .
264      */
265     @Test
266     public void testGetParsedOrSeenDependencyWithNotExistingDependency() {
267         assertNull(JAVA_PROGRAMMING_LANGUAGE_CONTEXT2
268                 .getParsedOrSeenDependency("net.sourceforge.test.GenericDependency"));
269     }
270 
271     /**
272      * Test method for
273      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getPlantUMLClassesDiagram()}
274      * .
275      */
276     @Test
277     public void testGetPlantUMLClassesDiagram() {
278         assertEquals(PLANTUML_CLASSES_DIAGRAM_TEST2, JAVA_PROGRAMMING_LANGUAGE_CONTEXT2.getPlantUMLClassesDiagram());
279     }
280 
281     /**
282      * Test method for
283      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getPlantUMLClassesDiagram()}
284      * .
285      */
286     @Test
287     public void testGetPlantUMLClassesDiagramWithNamePattern() {
288         assertEquals(
289                 new PlantUMLClassesDiagramImpl(
290                         new TreeSet < PlantUMLClassesDiagramElement >(
291                                 asList(new PlantUMLClassesDiagramElement[] {
292                                         new PlantUMLClassesDiagramClassElementImpl(
293                                                 "net.sourceforge.plantumldependency.main.option.programminglanguage.TestReadDependencyFromFileInterfaceWithoutPackage"),
294                                         new PlantUMLClassesDiagramClassElementImpl(
295                                                 "net.sourceforge.plantumldependency.main.option.programminglanguage.TestReadDependencyFromFileInterfaceWithoutPackage")})),
296                         new TreeSet < PlantUMLClassesDiagramRelation >()),
297                 JAVA_PROGRAMMING_LANGUAGE_CONTEXT7.getPlantUMLClassesDiagram());
298     }
299 
300     /**
301      * Test method for
302      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getPlantUMLClassesDiagram()}
303      * .
304      */
305     @Test
306     public void testGetPlantUMLClassesDiagramWithPackageNamePattern() {
307         assertEquals(
308                 new PlantUMLClassesDiagramImpl(
309                         new TreeSet < PlantUMLClassesDiagramElement >(
310                                 asList(new PlantUMLClassesDiagramElement[] {new PlantUMLClassesDiagramClassElementImpl(
311                                         "net.sourceforge.plantumldependency.main.option.programminglanguage.TestReadDependencyFromFileInterfaceWithoutPackage")})),
312                         new TreeSet < PlantUMLClassesDiagramRelation >()),
313                 JAVA_PROGRAMMING_LANGUAGE_CONTEXT6.getPlantUMLClassesDiagram());
314     }
315 
316     /**
317      * Test method for
318      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#getPotentialJavaLangSeenDependencies()}
319      * .
320      */
321     @Test
322     public void testGetPotentialJavaLangSeenDependencies() {
323         assertEquals(1, JAVA_PROGRAMMING_LANGUAGE_CONTEXT4.getPotentialJavaLangSeenDependencies().size());
324     }
325 
326     /**
327      * Test method for
328      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#hasToDisplay(net.sourceforge.plantumldependency.cli.main.option.display.type.argument.DisplayType)}
329      * .
330      */
331     @Test
332     public void testHasToDisplayWithExistingDisplay() {
333         assertTrue(JAVA_PROGRAMMING_LANGUAGE_CONTEXT2.hasToDisplay(ABSTRACT_CLASSES));
334     }
335 
336     /**
337      * Test method for
338      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#removeAllPotentialJavaLangSeenDependencyAndChangePackageToJavaLang()}
339      * .
340      */
341     @Test
342     public void testRemoveAllPotentialJavaLangSeenDependencyAndChangePackageToJavaLang() {
343         final GenericDependency dependency = new GenericDependencyImpl(
344                 "TestReadDependencyFromFileInterfaceWithoutPackage",
345                 "net.sourceforge.plantumldependency.main.option.programminglanguage");
346         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = new JavaProgrammingLanguageContext(
347                 new TreeSet < GenericDependency >(asList(new GenericDependency[] {dependency,
348                         new GenericDependencyImpl("GenericDependency", "net.sourceforge.plantumldependency.generic")})),
349                 new TreeSet < GenericDependency >(asList(new GenericDependency[] {new GenericDependencyImpl(
350                         "GenericDependency", "net.sourceforge.plantumldependency.generic")})),
351                 new TreeSet < GenericDependency >(asList(new GenericDependency[] {dependency})), DISPLAY_TYPES_OPTIONS,
352                 DEFAULT_DISPLAY_PACKAGE_NAME_OPTIONS_PATTERN, DEFAULT_DISPLAY_NAME_OPTIONS_PATTERN);
353         javaProgrammingLanguageContext.removeAllPotentialJavaLangSeenDependencyAndChangePackageToJavaLang();
354         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
355         assertEquals(1, javaProgrammingLanguageContext.getParsedDependencies().size());
356         assertEquals(0, javaProgrammingLanguageContext.getPotentialJavaLangSeenDependencies().size());
357         assertNotNull(javaProgrammingLanguageContext
358                 .getParsedOrSeenDependency("java.lang.TestReadDependencyFromFileInterfaceWithoutPackage"));
359     }
360 
361     /**
362      * Test method for
363      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#removePotentialJavaLangSeenDependency(String)}
364      * .
365      */
366     @Test
367     public void testRemovePotentialJavaLangSeenDependencyWithExistingDependency() {
368         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT4
369                 .deepClone();
370         javaProgrammingLanguageContext
371                 .removePotentialJavaLangSeenDependency("net.sourceforge.plantumldependency.main.option.programminglanguage.TestReadDependencyFromFileInterfaceWithoutPackage");
372         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
373         assertEquals(0, javaProgrammingLanguageContext.getPotentialJavaLangSeenDependencies().size());
374     }
375 
376     /**
377      * Test method for
378      * {@link net.sourceforge.plantumldependency.cli.main.option.programminglanguage.context.impl.JavaProgrammingLanguageContext#removePotentialJavaLangSeenDependency(String)}
379      * .
380      */
381     @Test
382     public void testRemovePotentialJavaLangSeenDependencyWithNotExistingDependency() {
383         final JavaProgrammingLanguageContext javaProgrammingLanguageContext = (JavaProgrammingLanguageContext) JAVA_PROGRAMMING_LANGUAGE_CONTEXT4
384                 .deepClone();
385         javaProgrammingLanguageContext
386                 .removePotentialJavaLangSeenDependency("net.sourceforge.mazix.components.clone.DeepCloneable");
387         assertEquals(2, javaProgrammingLanguageContext.getParsedAndSeenDependencies().size());
388         assertEquals(1, javaProgrammingLanguageContext.getPotentialJavaLangSeenDependencies().size());
389     }
390 
391     // TODO better test the getPlantUMLDiagram method with display option and with specific context
392 }