@Test void convert() { RecipeV4Request request = new RecipeV4Request(); request.setContent("content"); request.setDescription("desc"); request.setName("name"); request.setType(RecipeV4Type.POST_CLOUDERA_MANAGER_START); CreateRecipeRequest result = underTest.convert(request); assertEquals(request.getContent(), result.getRecipeContent()); assertEquals(request.getDescription(), result.getDescription()); assertEquals(request.getName(), result.getRecipeName()); assertEquals(request.getType().name(), result.getType()); }
@Override public CreateRecipeRequest convert(RecipeV4Request source) { CreateRecipeRequest recipe = new CreateRecipeRequest(); recipe.setRecipeName(source.getName()); recipe.setDescription(source.getDescription()); recipe.setType(source.getType().name()); recipe.setRecipeContent(source.getContent()); return recipe; }
RecipeV4RequestToCreateRecipeRequestConverter extends AbstractConversionServiceAwareConverter<RecipeV4Request, CreateRecipeRequest> { @Override public CreateRecipeRequest convert(RecipeV4Request source) { CreateRecipeRequest recipe = new CreateRecipeRequest(); recipe.setRecipeName(source.getName()); recipe.setDescription(source.getDescription()); recipe.setType(source.getType().name()); recipe.setRecipeContent(source.getContent()); return recipe; } }
RecipeV4RequestToCreateRecipeRequestConverter extends AbstractConversionServiceAwareConverter<RecipeV4Request, CreateRecipeRequest> { @Override public CreateRecipeRequest convert(RecipeV4Request source) { CreateRecipeRequest recipe = new CreateRecipeRequest(); recipe.setRecipeName(source.getName()); recipe.setDescription(source.getDescription()); recipe.setType(source.getType().name()); recipe.setRecipeContent(source.getContent()); return recipe; }  }
RecipeV4RequestToCreateRecipeRequestConverter extends AbstractConversionServiceAwareConverter<RecipeV4Request, CreateRecipeRequest> { @Override public CreateRecipeRequest convert(RecipeV4Request source) { CreateRecipeRequest recipe = new CreateRecipeRequest(); recipe.setRecipeName(source.getName()); recipe.setDescription(source.getDescription()); recipe.setType(source.getType().name()); recipe.setRecipeContent(source.getContent()); return recipe; }  @Override CreateRecipeRequest convert(RecipeV4Request source); }
RecipeV4RequestToCreateRecipeRequestConverter extends AbstractConversionServiceAwareConverter<RecipeV4Request, CreateRecipeRequest> { @Override public CreateRecipeRequest convert(RecipeV4Request source) { CreateRecipeRequest recipe = new CreateRecipeRequest(); recipe.setRecipeName(source.getName()); recipe.setDescription(source.getDescription()); recipe.setType(source.getType().name()); recipe.setRecipeContent(source.getContent()); return recipe; }  @Override CreateRecipeRequest convert(RecipeV4Request source);  }