@Test public void testWhenToConnectionUsernameNotOnAzure() { String username = dbUsernameConverterService.toConnectionUsername("hostname.something.com", "username"); assertEquals("username", username); }
public String toConnectionUsername(String host, String dbUser) { if (isAzure(host)) { LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host); return dbUser + "@" + StringUtils.substringBefore(host, "."); } return dbUser; }
DbUsernameConverterService { public String toConnectionUsername(String host, String dbUser) { if (isAzure(host)) { LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host); return dbUser + "@" + StringUtils.substringBefore(host, "."); } return dbUser; } }
DbUsernameConverterService { public String toConnectionUsername(String host, String dbUser) { if (isAzure(host)) { LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host); return dbUser + "@" + StringUtils.substringBefore(host, "."); } return dbUser; }  }
DbUsernameConverterService { public String toConnectionUsername(String host, String dbUser) { if (isAzure(host)) { LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host); return dbUser + "@" + StringUtils.substringBefore(host, "."); } return dbUser; }  String toConnectionUsername(String host, String dbUser); String toDatabaseUsername(String username); }
DbUsernameConverterService { public String toConnectionUsername(String host, String dbUser) { if (isAzure(host)) { LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host); return dbUser + "@" + StringUtils.substringBefore(host, "."); } return dbUser; }  String toConnectionUsername(String host, String dbUser); String toDatabaseUsername(String username);  }