### Question:
TypedValueComponentSelector { public TypedValueSelector makeSelectorForType(final String type) { if (isEqual(type, DATE)) { return dateSelector; } if (isEqual(type, DURATION_DAYS_TIME)) { return dayTimeSelector; } if (isEqual(type, DURATION_YEAR_MONTH)) { return yearsMosSelector; } if (isEqual(type, STRING)) { return stringSelector; } if (isEqual(type, NUMBER)) { return numberSelector; } if (isEqual(type, TIME)) { return timeSelector; } if (isEqual(type, DATE_TIME)) { return dateTimeSelector; } return genericSelector; } @Inject  TypedValueComponentSelector(final GenericSelector genericSelector,
                                       final DateSelector dateSelector,
                                       final DayTimeSelector dayTimeSelector,
                                       final YearsMonthsSelector yearsMosSelector,
                                       final StringSelector stringSelector,
                                       final NumberSelector numberSelector,
                                       final TimeSelector timeSelector,
                                       final DateTimeSelector dateTimeSelector); TypedValueSelector makeSelectorForType(final String type);  }### Answer:
@Test public void testGetDateSelector() { final TypedValueSelector actual = selector.makeSelectorForType(DATE.getName()); assertEquals(dateSelector, actual); }
@Test public void testGetNumberSelector() { final TypedValueSelector actual = selector.makeSelectorForType(NUMBER.getName()); assertEquals(numberSelector, actual); }
@Test public void testGetStringSelector() { final TypedValueSelector actual = selector.makeSelectorForType(STRING.getName()); assertEquals(stringSelector, actual); }
@Test public void testGetDurationYearMonthSelector() { final TypedValueSelector actual = selector.makeSelectorForType(DURATION_YEAR_MONTH.getName()); assertEquals(yearsMosSelector, actual); }
@Test public void testGetDurationDayTimeSelector() { final TypedValueSelector actual = selector.makeSelectorForType(DURATION_DAYS_TIME.getName()); assertEquals(dayTimeSelector, actual); }
@Test public void testGetGenericSelector() { final TypedValueSelector actual = selector.makeSelectorForType("unknown"); assertEquals(genericSelector, actual); }
@Test public void testGetTimeSelector() { final TypedValueSelector actual = selector.makeSelectorForType(TIME.getName()); assertEquals(timeSelector, actual); }
@Test public void testGetDateTimeSelector() { final TypedValueSelector actual = selector.makeSelectorForType(DATE_TIME.getName()); assertEquals(dateTimeSelector, actual); }