@Test public void testGetThrowsNotFoundException() throws Throwable { assertThrows(NameRegistrar.NotFoundException.class, () -> { NameRegistrar.get("NonexistentKey"); }); }
public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private  NameRegistrar(); }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private  NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister(String key); static T get(String key); static T get(String key, long timeout); static T getIfExists(String key); void dump(PrintStream p, String indent); void dump(PrintStream p, String indent, boolean detail); }
NameRegistrar implements Loggeable { public static <T> T get(String key) throws NotFoundException { @SuppressWarnings("unchecked") T obj = (T) sp.rdp(key); if (obj == null) { throw new NotFoundException(key); } return obj; } private  NameRegistrar(); static TSpace<String, Object> getSpace(); static Map<String,Object> getAsMap(); static NameRegistrar getInstance(); static void register(String key, Object value); static void unregister(String key); static T get(String key); static T get(String key, long timeout); static T getIfExists(String key); void dump(PrintStream p, String indent); void dump(PrintStream p, String indent, boolean detail);  }