@Test public void addAddress_shouldAddNewAddress() { Short addressId = addressService.addAddress(newAddress()); assertThat(addressId, notNullValue()); }
@Nonnull public Short addAddress(Address address) { addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); }
AddressService { @Nonnull public Short addAddress(Address address) { addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); } }
AddressService { @Nonnull public Short addAddress(Address address) { addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); } AddressService(@Nonnull SqlSessionManager sqlSessionManager); }
AddressService { @Nonnull public Short addAddress(Address address) { addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); } AddressService(@Nonnull SqlSessionManager sqlSessionManager); @Nonnull Short addAddress(Address address); @Nullable Address getAddress(short id); }
AddressService { @Nonnull public Short addAddress(Address address) { addressMapper.insert(address); logger.info("Added address[{}]", address); return address.getAddressId(); } AddressService(@Nonnull SqlSessionManager sqlSessionManager); @Nonnull Short addAddress(Address address); @Nullable Address getAddress(short id);  }