@Test public void unionAndSimplify_bothAreEmpty() { final String simplified = new VisibilitySimplifier().unionAndSimplify("", ""); assertEquals("", simplified); }
public static String unionAndSimplify(final String vis1, final String vis2) { requireNonNull(vis1); requireNonNull(vis2); if(vis1.isEmpty()) { return vis2; } if(vis2.isEmpty()) { return vis1; } return simplify("(" + vis1 + ")&(" + vis2 + ")"); }
VisibilitySimplifier { public static String unionAndSimplify(final String vis1, final String vis2) { requireNonNull(vis1); requireNonNull(vis2); if(vis1.isEmpty()) { return vis2; } if(vis2.isEmpty()) { return vis1; } return simplify("(" + vis1 + ")&(" + vis2 + ")"); } }
VisibilitySimplifier { public static String unionAndSimplify(final String vis1, final String vis2) { requireNonNull(vis1); requireNonNull(vis2); if(vis1.isEmpty()) { return vis2; } if(vis2.isEmpty()) { return vis1; } return simplify("(" + vis1 + ")&(" + vis2 + ")"); }  }
VisibilitySimplifier { public static String unionAndSimplify(final String vis1, final String vis2) { requireNonNull(vis1); requireNonNull(vis2); if(vis1.isEmpty()) { return vis2; } if(vis2.isEmpty()) { return vis1; } return simplify("(" + vis1 + ")&(" + vis2 + ")"); }  static String unionAndSimplify(final String vis1, final String vis2); static String simplify(final String visibility); }
VisibilitySimplifier { public static String unionAndSimplify(final String vis1, final String vis2) { requireNonNull(vis1); requireNonNull(vis2); if(vis1.isEmpty()) { return vis2; } if(vis2.isEmpty()) { return vis1; } return simplify("(" + vis1 + ")&(" + vis2 + ")"); }  static String unionAndSimplify(final String vis1, final String vis2); static String simplify(final String visibility);  }