Syncbase { public static void advertiseLoggedInUserInNeighborhood() throws SyncbaseException { try { Neighborhood.StartAdvertising(new ArrayList<String>()); } catch(VError e) { chainThrow("advertising user in neighborhood", e); throw new AssertionError("never happens"); } } private  Syncbase(); static void init(Options opts); static void executeCallback(Runnable runnable); static Database database(); static void shutdown(); static boolean isLoggedIn(); static User getLoggedInUser(); static void login(final String authToken, final String provider, final LoginCallback cb); static void addScanForUsersInNeighborhood(final ScanNeighborhoodForUsersCallback cb); static void removeScanForUsersInNeighborhood(ScanNeighborhoodForUsersCallback cb); static void removeAllScansForUsersInNeighborhood(); static void advertiseLoggedInUserInNeighborhood(); static void advertiseLoggedInUserInNeighborhood(Iterable<User> usersWhoCanSee); static void stopAdvertisingLoggedInUserInNeighborhood(); static boolean isAdvertisingLoggedInUserInNeighborhood(); static final String USERDATA_NAME; }
@Test public void testAdvertiseInNeighborhoodNotLoggedIn() { try { Syncbase.advertiseLoggedInUserInNeighborhood(); fail("should throw because the user isn't logged in"); } catch (SyncbaseException e) { } }