@Test public void addAddress_shouldAddNewAddress() { Short addressId = addressService.addAddress(TestUtil.newAddress()); assertThat(addressId, notNullValue()); }
@Nonnull public Short addAddress(@Nonnull Address address) { checkNotNull(address, "Argument[address] must not be null"); addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); }
AddressService { @Nonnull public Short addAddress(@Nonnull Address address) { checkNotNull(address, "Argument[address] must not be null"); addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); } }
AddressService { @Nonnull public Short addAddress(@Nonnull Address address) { checkNotNull(address, "Argument[address] must not be null"); addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); }  }
AddressService { @Nonnull public Short addAddress(@Nonnull Address address) { checkNotNull(address, "Argument[address] must not be null"); addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); }  @Autowired void setAddressMapper(@Nonnull AddressMapper addressMapper); @Nonnull Short addAddress(@Nonnull Address address); }
AddressService { @Nonnull public Short addAddress(@Nonnull Address address) { checkNotNull(address, "Argument[address] must not be null"); addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); }  @Autowired void setAddressMapper(@Nonnull AddressMapper addressMapper); @Nonnull Short addAddress(@Nonnull Address address);  }