@Test
public void getActiveUsernameThatDoesNotExistTest() {

    // Setup:
    when(context.getProperty(AuthenticationProps.USERNAME)).thenReturn(null);
    try {
        RestUtils.getActiveUsername(context);
        fail("Expected MobiWebException to have been thrown");
    } catch (MobiWebException e) {
        assertEquals(401, e.getResponse().getStatus());
    }
}