@Test void shouldAssemble() { Pokemon pokemon = from("a valid pokemon", Pokemon.class); PokemonResponse pokemonResponse = pokemonToPokemonResponseAssembler.assemble(pokemon); assertThat(pokemonResponse, notNullValue()); assertThat( pokemonResponse.getAbilities(), equalTo(Arrays.asList(Ability.LIMBER, Ability.OVERGROW))); assertThat(pokemonResponse.getBaseExperience(), equalTo(2000)); assertThat(pokemonResponse.getHeight(), equalTo(12)); assertThat(pokemonResponse.getName(), equalTo("ditto")); assertThat(pokemonResponse.getWeight(), equalTo(21)); }
public PokemonResponse assemble(Pokemon data) { return PokemonResponse.builder() .name(data.getName()) .abilities(data.getAbilities()) .baseExperience(data.getBaseExperience()) .weight(data.getWeight()) .height(data.getHeight()) .build(); }
PokemonToPokemonResponseAssembler { public PokemonResponse assemble(Pokemon data) { return PokemonResponse.builder() .name(data.getName()) .abilities(data.getAbilities()) .baseExperience(data.getBaseExperience()) .weight(data.getWeight()) .height(data.getHeight()) .build(); } }
PokemonToPokemonResponseAssembler { public PokemonResponse assemble(Pokemon data) { return PokemonResponse.builder() .name(data.getName()) .abilities(data.getAbilities()) .baseExperience(data.getBaseExperience()) .weight(data.getWeight()) .height(data.getHeight()) .build(); }  }
PokemonToPokemonResponseAssembler { public PokemonResponse assemble(Pokemon data) { return PokemonResponse.builder() .name(data.getName()) .abilities(data.getAbilities()) .baseExperience(data.getBaseExperience()) .weight(data.getWeight()) .height(data.getHeight()) .build(); }  PokemonResponse assemble(Pokemon data); }
PokemonToPokemonResponseAssembler { public PokemonResponse assemble(Pokemon data) { return PokemonResponse.builder() .name(data.getName()) .abilities(data.getAbilities()) .baseExperience(data.getBaseExperience()) .weight(data.getWeight()) .height(data.getHeight()) .build(); }  PokemonResponse assemble(Pokemon data);  }