@Test
public void testUserName() throws IOException {

 User user = createUser();
 application.setCurrentUser(user);
    String result = injector.getInstance(Key.get(String.class, Names.named("USER_NAME")));
    assertThat(result, equalTo(user.getUserName()));
}