@Test public void mustGenerateJoinPointUniqueNameForEqualityComparison() { final Class[] paramTypes = { String.class, String.class }; final String[] paramNames = { "paramOne", "paramTwo" }; final Object[] paramValues = { "ValueOne", "ValueTwo" }; final TestJoinPoint testJoinPointOne = new TestJoinPoint.Builder(this.getClass()) .withParamTypes(paramTypes) .withParamNames(paramNames) .withParamValues(paramValues) .build(); final TestJoinPoint testJoinPointTwo = new TestJoinPoint.Builder(this.getClass()).build(); final FrodoJoinPoint frodoJoinPointOne = new FrodoJoinPoint(testJoinPointOne); final FrodoJoinPoint frodoJoinPointTwo = new FrodoJoinPoint(testJoinPointTwo); assertThat(frodoJoinPointOne).isNotEqualTo(frodoJoinPointTwo); assertThat(frodoJoinPointOne.hashCode()).isNotEqualTo(frodoJoinPointTwo.hashCode()); }
@Override public int hashCode() { return this.joinPointUniqueName.hashCode(); }
FrodoJoinPoint { @Override public int hashCode() { return this.joinPointUniqueName.hashCode(); } }
FrodoJoinPoint { @Override public int hashCode() { return this.joinPointUniqueName.hashCode(); } FrodoJoinPoint(JoinPoint joinPoint); }
FrodoJoinPoint { @Override public int hashCode() { return this.joinPointUniqueName.hashCode(); } FrodoJoinPoint(JoinPoint joinPoint); String getClassSimpleName(); String getMethodName(); List<Class> getMethodParamTypesList(); List<String> getMethodParamNamesList(); List<Object> getMethodParamValuesList(); String getExecutionThreadName(); Annotation getAnnotation(Class<? extends Annotation> annotation); boolean hasReturnType(JoinPoint joinPoint); Class getReturnType(); List<Class> getGenericReturnTypes(); Object getTarget(); JoinPoint getJoinPoint(); @Override boolean equals(Object object); @Override int hashCode(); }
FrodoJoinPoint { @Override public int hashCode() { return this.joinPointUniqueName.hashCode(); } FrodoJoinPoint(JoinPoint joinPoint); String getClassSimpleName(); String getMethodName(); List<Class> getMethodParamTypesList(); List<String> getMethodParamNamesList(); List<Object> getMethodParamValuesList(); String getExecutionThreadName(); Annotation getAnnotation(Class<? extends Annotation> annotation); boolean hasReturnType(JoinPoint joinPoint); Class getReturnType(); List<Class> getGenericReturnTypes(); Object getTarget(); JoinPoint getJoinPoint(); @Override boolean equals(Object object); @Override int hashCode();  }