private MetadataDTO createMetaDataDTO(final String key, final String value) {
    MetadataDTO metadataDTO = new MetadataDTO();

    metadataDTO.setKey(key);
    metadataDTO.setValue(value);

    return metadataDTO;
  }
  /**
   * Tests creation and population of <code>MetadataDTO</code> object as a part of <code>SettingDTO
   * </code> state.
   */
  @Test
  public void testCreateMetadataDTO() {
    final SettingMetadata settingMetadata = context.mock(SettingMetadata.class);
    final String metadataKey = AVAILABLE_TO_MARKETING;
    final String metadataValue = VALUE;

    context.checking(
        new Expectations() {
          {
            oneOf(settingMetadata).getKey();
            will(returnValue(metadataKey));
            oneOf(settingMetadata).getValue();
            will(returnValue(metadataValue));
          }
        });

    MetadataDTO metadataDto = settingDefinitionAdapter.createMetadataDTO(settingMetadata);

    assertEquals(metadataKey, metadataDto.getKey());
    assertEquals(metadataValue, metadataDto.getValue());
  }