PoolHelper { public static boolean checkForOrderChanges(Pool existingPool, Pool pool) { return (!StringUtils.equals(existingPool.getOrderNumber(), pool.getOrderNumber()) || !StringUtils.equals(existingPool.getAccountNumber(), pool.getAccountNumber()) || !StringUtils.equals(existingPool.getContractNumber(), pool.getContractNumber())); } private  PoolHelper(); static Map<String, String> getFlattenedAttributes(Pool pool); static PoolOperationCallback createHostRestrictedPools(PoolManager poolManager, Consumer consumer,
        List<Pool> pools, Map<String, Entitlement> sourceEntitlements,
        Map<String, Map<String, String>> attributeMaps, ProductCurator productCurator); static Pool clonePool(Pool sourcePool, Product product, String quantity,
        Map<String, String> attributes, String subKey, OwnerProductCurator curator,
        Entitlement sourceEntitlement, Consumer sourceConsumer, ProductCurator productCurator); static boolean checkForOrderChanges(Pool existingPool, Pool pool);  }
@Test public void orderDataChangedOrderNumber() { Pool pool = new Pool(); pool.setOrderNumber("123A"); pool.setAccountNumber("456"); pool.setContractNumber("789"); Pool existingPool = new Pool(); existingPool.setOrderNumber("123"); existingPool.setAccountNumber("456"); existingPool.setContractNumber("789"); assertTrue(PoolHelper.checkForOrderChanges(existingPool, pool)); }
@Test public void orderDataChangedAccountNumber() { Pool pool = new Pool(); pool.setOrderNumber("123"); pool.setAccountNumber("456A"); pool.setContractNumber("789"); Pool existingPool = new Pool(); existingPool.setOrderNumber("123"); existingPool.setAccountNumber("456"); existingPool.setContractNumber("789"); assertTrue(PoolHelper.checkForOrderChanges(existingPool, pool)); }
@Test public void orderDataChangedContractNumber() { Pool pool = new Pool(); pool.setOrderNumber("123"); pool.setAccountNumber("456"); pool.setContractNumber("789A"); Pool existingPool = new Pool(); existingPool.setOrderNumber("123"); existingPool.setAccountNumber("456"); existingPool.setContractNumber("789"); assertTrue(PoolHelper.checkForOrderChanges(existingPool, pool)); }
@Test public void orderDataChanged() { Pool pool = new Pool(); pool.setOrderNumber("123"); pool.setAccountNumber("456"); pool.setContractNumber("789"); Pool existingPool = new Pool(); existingPool.setOrderNumber("123"); existingPool.setAccountNumber("456"); existingPool.setContractNumber("789"); assertFalse(PoolHelper.checkForOrderChanges(existingPool, pool)); }
@Test public void usingPrimitiveEqualsOnStringIsBad() { Pool pool = new Pool(); pool.setOrderNumber("123"); pool.setAccountNumber("456"); pool.setContractNumber("789"); Pool existingPool = new Pool(); existingPool.setOrderNumber(new String("123")); existingPool.setAccountNumber("456"); existingPool.setContractNumber("789"); assertFalse(PoolHelper.checkForOrderChanges(existingPool, pool)); }