Quantum { public static Tangle getTangle(String id) { if (entanglings == null || !entanglings.containsKey(id)) { return TANGLE_NO_OP; } else { return entanglings.get(id); } }  static void entangle(Activity target); static void detangle(Activity target); static void registerTangle(String id, Tangle tangle); static void unregisterTangle(String id); static Tangle getTangle(String id); static final String GENERATED_SUFFIX; }
@Test public void getTangleShouldBeNullSafe() { assertThat(Quantum.getTangle("anything"), is(Quantum.TANGLE_NO_OP)); assertThat(Quantum.getTangle(null), is(Quantum.TANGLE_NO_OP)); }