@Test public void invalidEqualsMethodsTest() throws Exception { /* GridTestKey */ GridTestKey obj1 = new GridTestKey(); try { obj1.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj1.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridListSetSelfTest$V1 */ Class V1 = Class.forName("org.apache.ignite.lang.utils.GridListSetSelfTest$V1"); assertEquals("V1", V1.getSimpleName()); Constructor cnst1 = V1.getDeclaredConstructor(int.class); cnst1.setAccessible(true); Object obj2 = cnst1.newInstance(1); try { obj2.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj2.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridListSetSelfTest$V2 */ Class V2 = Class.forName("org.apache.ignite.lang.utils.GridListSetSelfTest$V2"); assertEquals("V2", V2.getSimpleName()); Constructor cnst2 = V2.getDeclaredConstructor(int.class); cnst2.setAccessible(true); Object obj3 = cnst2.newInstance(1); try { obj3.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj3.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridTopic$T1 */ Object T1 = GridTopic.TOPIC_AUTH.topic(new IgniteUuid()); assertEquals("T1", T1.getClass().getSimpleName()); try { T1.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T2 */ Object T2 = GridTopic.TOPIC_AUTH.topic(new IgniteUuid(), new UUID(1,1)); assertEquals("T2", T2.getClass().getSimpleName()); try { T2.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T3 */ Object T3 = GridTopic.TOPIC_AUTH.topic(""); assertEquals("T3", T3.getClass().getSimpleName()); try { T3.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T4 */ Object T4 = GridTopic.TOPIC_AUTH.topic("", new UUID(1,1), 1L); assertEquals("T4", T4.getClass().getSimpleName()); try { T4.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T5 */ Object T5 = GridTopic.TOPIC_AUTH.topic("", 1, 1L); assertEquals("T5", T5.getClass().getSimpleName()); try { T5.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T6 */ Object T6 = GridTopic.TOPIC_AUTH.topic("", 1L); assertEquals("T6", T6.getClass().getSimpleName()); try { T6.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T7 */ Object T7 = GridTopic.TOPIC_AUTH.topic("", new UUID(1,1), 1, 1L); assertEquals("T7", T7.getClass().getSimpleName()); try { T7.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTopic$T8 */ Object T8 = GridTopic.TOPIC_AUTH.topic(new IgniteUuid(), 1L); assertEquals("T8", T8.getClass().getSimpleName()); try { T8.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* GridTuple6 */ GridTuple6 obj4 = new GridTuple6(); try { obj4.equals(new GridTuple5()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridServiceMethodReflectKey */ Class GridServiceMethodReflectKey = Class .forName("org.apache.ignite.internal.processors.service.GridServiceMethodReflectKey"); assertEquals("GridServiceMethodReflectKey", GridServiceMethodReflectKey.getSimpleName()); Constructor cnst3 = GridServiceMethodReflectKey.getDeclaredConstructor(String.class, Class[].class); cnst3.setAccessible(true); Object obj5 = cnst3.newInstance("name", null); try { obj5.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj5.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridCacheMvccCandidate */ GridCacheMvccCandidate obj6 = new GridCacheMvccCandidate(); try { obj6.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GatewayProtectedCacheProxy */ GatewayProtectedCacheProxy obj7 = new GatewayProtectedCacheProxy(); try { obj7.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj7.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* CancelMessageId */ Class CancelMessageId = Class.forName("org.apache.ignite.internal.processors.cache.query." + "GridCacheDistributedQueryManager$CancelMessageId"); assertEquals("CancelMessageId", CancelMessageId.getSimpleName()); Constructor cnst4 = CancelMessageId.getDeclaredConstructor(long.class, UUID.class); cnst4.setAccessible(true); Object obj8 = cnst4.newInstance(1L, UUID.randomUUID()); try { obj8.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj8.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* MyStringKey */ GridCachePreloadLifecycleAbstractTest.MyStringKey obj9 = new GridCachePreloadLifecycleAbstractTest.MyStringKey(""); try { obj9.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } /* MappingKey */ Class MappingKey = Class.forName("org.apache.ignite.internal.processors.cache.distributed.near." + "GridNearOptimisticTxPrepareFuture$MappingKey"); assertEquals("MappingKey", MappingKey.getSimpleName()); Constructor cnst5 = MappingKey.getDeclaredConstructor(UUID.class, boolean.class); cnst5.setAccessible(true); Object obj10 = cnst5.newInstance(UUID.randomUUID(), false); try { obj10.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj10.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridDhtPartitionMap */ GridDhtPartitionMap obj11 = new GridDhtPartitionMap(); try { obj11.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj11.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridDhtPartitionFullMap */ GridDhtPartitionFullMap obj12 = new GridDhtPartitionFullMap(); try { obj12.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj12.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* GridDhtPartitionExchangeId */ GridDhtPartitionExchangeId obj13 = new GridDhtPartitionExchangeId(); try { obj13.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } /* TestObject2 */ Class TestObject2 = Class.forName("org.apache.ignite.internal.marshaller.optimized." + "OptimizedMarshallerSelfTest$TestObject2"); assertEquals("TestObject2", TestObject2.getSimpleName()); Constructor cnst6 = TestObject2.getDeclaredConstructor(int.class); cnst6.setAccessible(true); Object obj14 = cnst5.newInstance(UUID.randomUUID(), false); try { obj14.equals(null); fail(); } catch (NullPointerException ignored) { /* no-op */ } try { obj14.equals(new Object()); fail(); } catch (ClassCastException ignored) { /* no-op */ } }