### Question:
Configurator { public String[] asArray(String value){ return value.split(","); }  @PostConstruct void initialize(); @Produces int getInteger(InjectionPoint ip); @Produces boolean getBoolean(InjectionPoint ip); @Produces String getString(InjectionPoint ip); @Produces String[] getStringArray(InjectionPoint ip); String[] getStringArray(String key); String getValue(String key); String[] asArray(String value); int getValueAsInt(String interval); void setValue(String key,int interval); void setValue(String key,boolean value); void setValue(String key, String value); void setArrayValue(String key, String[] values);  }### Answer:
@Test public void asArrayWithMultipleSlots() { String[] expected = {"hey","joe"}; String[] actual = cut.asArray("hey,joe"); assertArrayEquals(expected, actual); }
@Test public void asArrayWithSingleSlot() { String[] expected = {"hey"}; String[] actual = cut.asArray("hey"); assertArrayEquals(expected, actual); }