### Question:
ConvertingServerGroup implements ServerGroup { @Override public String getName() { int separatorIndex = serverName.indexOf('-'); if (separatorIndex > 0) { return serverName.substring(0, separatorIndex); } return serverName; } ConvertingServerGroup(ServerName serverName); @Override String getName();  }### Answer:
@Test public void whenPartOfGroup() { ServerGroup group = new ConvertingServerGroup("bw-1"); assertEquals("bw", group.getName()); }
@Test public void whenNotPart() { ServerGroup serverGroup = new ConvertingServerGroup("creative"); assertEquals("creative", serverGroup.getName()); }