### Question:
ConstraintPlaceholderHelper { public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); String getPlaceholderSentence(final String type); String getPlaceholderSample(final String type);  }### Answer:
@Test public void testGetPlaceholderSampleWhenTypeIsBuiltInTypeWithoutDefinedSample() { final String expectedPlaceholder = "Insert a value"; when(translationService.format("ConstraintPlaceholderHelper.SampleDefault")).thenReturn(expectedPlaceholder); final String actualPlaceholder = placeholderHelper.getPlaceholderSample("context"); assertEquals(expectedPlaceholder, actualPlaceholder); }
@Test public void testGetPlaceholderSampleWhenTypeIsNotBuiltInType() { final String expectedPlaceholder = "Insert a value"; when(translationService.format("ConstraintPlaceholderHelper.SampleDefault")).thenReturn(expectedPlaceholder); final String actualPlaceholder = placeholderHelper.getPlaceholderSample("Structure"); assertEquals(expectedPlaceholder, actualPlaceholder); }