@Test public void testWhenToDatabaseUsername() { String username = dbUsernameConverterService.toDatabaseUsername("username@hostname"); assertEquals("username", username); }
public String toDatabaseUsername(String username) { return StringUtils.substringBefore(username, "@"); }
DbUsernameConverterService { public String toDatabaseUsername(String username) { return StringUtils.substringBefore(username, "@"); } }
DbUsernameConverterService { public String toDatabaseUsername(String username) { return StringUtils.substringBefore(username, "@"); }  }
DbUsernameConverterService { public String toDatabaseUsername(String username) { return StringUtils.substringBefore(username, "@"); }  String toConnectionUsername(String host, String dbUser); String toDatabaseUsername(String username); }
DbUsernameConverterService { public String toDatabaseUsername(String username) { return StringUtils.substringBefore(username, "@"); }  String toConnectionUsername(String host, String dbUser); String toDatabaseUsername(String username);  }