input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testMoveBaseModelToTrashIsNotVisible ( ) { org . junit . Assume . assumeTrue ( ( ( this ) instanceof com . liferay . trash . test . util . WhenIsAssetableBaseModel ) ) ; com . liferay . trash . test . util . WhenIsAssetableBaseModel whenIsAssetableBaseModel = ( ( com . liferay . trash . test . util . WhenIsAssetableBaseModel ) ( this ) ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . portal . kernel . model . BaseModel < ? > parentBaseModel = getParentBaseModel ( group , serviceContext ) ; baseModel = addBaseModel ( parentBaseModel , serviceContext ) ; moveBaseModelToTrash ( ( ( java . lang . Long ) ( baseModel . getPrimaryKeyObj ( ) ) ) ) ; "<AssertPlaceHolder>" ; } isAssetEntryVisible ( com . liferay . portal . kernel . model . ClassedModel , long ) { com . liferay . message . boards . model . MBMessage rootMessage = com . liferay . message . boards . service . MBMessageLocalServiceUtil . getMBMessage ( ( ( com . liferay . message . boards . model . MBThread ) ( classedModel ) ) . getRootMessageId ( ) ) ; return _whenIsAssetable . isAssetEntryVisible ( rootMessage , getAssetClassPK ( rootMessage ) ) ; }
org . junit . Assert . assertFalse ( whenIsAssetableBaseModel . isAssetEntryVisible ( baseModel , getAssetClassPK ( baseModel ) ) )
testFinalBoundaryOnly ( ) { java . lang . String delimiter = "\r\n" ; final java . lang . String boundary = "MockMultiPartTestBoundary" ; java . lang . String str = ( ( ( ( ( ( delimiter + "Hello<sp>world" ) + delimiter ) + delimiter ) + "--" ) + boundary ) + "--" ) + delimiter ; javax . servlet . MultipartConfigElement config = new javax . servlet . MultipartConfigElement ( _dirname , 1024 , 3072 , 50 ) ; com . firefly . codec . http2 . model . MultiPartFormInputStream mpis = new com . firefly . codec . http2 . model . MultiPartFormInputStream ( new test . codec . http2 . model . ByteArrayInputStream ( str . getBytes ( ) ) , ( "multipart/form-data,<sp>boundary=" + boundary ) , config , _tmpDir ) ; mpis . setDeleteOnExit ( true ) ; "<AssertPlaceHolder>" ; } getParts ( ) { if ( ( multiPartFormInputStream ) == null ) { return null ; } else { try { return multiPartFormInputStream . getParts ( ) ; } catch ( java . io . IOException e ) { com . firefly . server . http2 . router . handler . body . HTTPBodyHandlerSPIImpl . log . error ( "get<sp>multi<sp>part<sp>exception" , e ) ; return null ; } } }
org . junit . Assert . assertTrue ( mpis . getParts ( ) . isEmpty ( ) )
testSerialization ( ) { com . orsoncharts . label . StandardPieLabelGenerator lg1 = new com . orsoncharts . label . StandardPieLabelGenerator ( ) ; com . orsoncharts . label . StandardPieLabelGenerator lg2 = new com . orsoncharts . label . StandardPieLabelGenerator ( ) ; com . orsoncharts . TestUtils . serialized ( lg1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof com . orsoncharts . graphics3d . Offset3D ) ) { return false ; } com . orsoncharts . graphics3d . Offset3D that = ( ( com . orsoncharts . graphics3d . Offset3D ) ( obj ) ) ; if ( ( this . dx ) != ( that . dx ) ) { return false ; } if ( ( this . dy ) != ( that . dy ) ) { return false ; } if ( ( this . dz ) != ( that . dz ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( lg1 . equals ( lg2 ) )
testGetStagedModelDataHandler ( ) { com . liferay . exportimport . kernel . lar . StagedModelDataHandler < ? > stagedModelDataHandler = com . liferay . exportimport . kernel . lar . StagedModelDataHandlerRegistryUtil . getStagedModelDataHandler ( com . liferay . portal . kernel . lar . bundle . stagedmodeldatahandlerregistryutil . TestStagedModelDataHandler . CLASS_NAMES [ 0 ] ) ; java . lang . Class < ? > clazz = stagedModelDataHandler . getClass ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return com . liferay . portal . kernel . template . bundle . templateresourceloaderutil . TestTemplateResourceLoader . TEST_TEMPLATE_RESOURCE_LOADER_NAME ; }
org . junit . Assert . assertEquals ( com . liferay . portal . kernel . lar . bundle . stagedmodeldatahandlerregistryutil . TestStagedModelDataHandler . class . getName ( ) , clazz . getName ( ) )
g_VX4X_hasXage_gt_30X ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , org . apache . tinkerpop . gremlin . structure . Vertex > traversalJosh = get_g_VX1X_hasXage_gt_30X ( convertToVertexId ( "josh" ) ) ; printTraversalForm ( traversalJosh ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ! ( this . queue . isEmpty ( ) ) ) return true ; else if ( ! ( this . inputIterator . hasNext ( ) ) ) { this . mapReduce . workerEnd ( MapReduce . Stage . REDUCE ) ; return false ; } else { this . processNext ( ) ; return this . hasNext ( ) ; } }
org . junit . Assert . assertTrue ( traversalJosh . hasNext ( ) )
testValueOfWithNull ( ) { "<AssertPlaceHolder>" ; } valueOf ( org . apache . geode . cache . InterestPolicy ) { for ( org . springframework . data . gemfire . InterestPolicyType interestPolicyType : org . springframework . data . gemfire . InterestPolicyType . values ( ) ) { if ( interestPolicyType . getInterestPolicy ( ) . equals ( interestPolicy ) ) { return interestPolicyType ; } } return null ; }
org . junit . Assert . assertNull ( org . springframework . data . gemfire . InterestPolicyType . valueOf ( ( ( org . apache . geode . cache . InterestPolicy ) ( null ) ) ) )
findReturnsNullWhenVersionTagValueSetsExclusiveLowerMaxInclusiveHigherMin ( ) { java . lang . String mavenVersionRange = "(,1.1),[1.1,)" ; findReturnsValueWhenVersionTagValueIsSet ( mavenVersionRange ) ; "<AssertPlaceHolder>" ; } find ( ) { org . apache . maven . artifact . versioning . ArtifactVersion childMavenVersion = getHighestArtifactVersion ( getPrerequisitesMavenVersion ( ) , getEnforcerMavenVersion ( ) ) ; if ( ! ( mavenProject . hasParent ( ) ) ) { return childMavenVersion ; } org . apache . maven . artifact . versioning . ArtifactVersion parentMavenVersion = new org . codehaus . mojo . versions . RequiredMavenVersionFinder ( mavenProject . getParent ( ) ) . find ( ) ; return getHighestArtifactVersion ( childMavenVersion , parentMavenVersion ) ; }
org . junit . Assert . assertNull ( new org . codehaus . mojo . versions . RequiredMavenVersionFinder ( mavenProject ) . find ( ) )
testMaxFunctionQuantityTypeDifferentUnits ( ) { items . add ( createNumberItem ( "TestItem1" , javax . measure . quantity . Temperature . class , new org . eclipse . smarthome . core . library . types . QuantityType < javax . measure . quantity . Temperature > ( "100<sp>C" ) ) ) ; items . add ( createNumberItem ( "TestItem2" , javax . measure . quantity . Temperature . class , UnDefType . NULL ) ) ; items . add ( createNumberItem ( "TestItem3" , javax . measure . quantity . Temperature . class , new org . eclipse . smarthome . core . library . types . QuantityType < javax . measure . quantity . Temperature > ( "113<sp>F" ) ) ) ; items . add ( createNumberItem ( "TestItem4" , javax . measure . quantity . Temperature . class , UnDefType . UNDEF ) ) ; items . add ( createNumberItem ( "TestItem5" , javax . measure . quantity . Temperature . class , new org . eclipse . smarthome . core . library . types . QuantityType < javax . measure . quantity . Temperature > ( "294.15<sp>K" ) ) ) ; function = new org . eclipse . smarthome . core . library . types . QuantityTypeArithmeticGroupFunction . Max ( javax . measure . quantity . Temperature . class ) ; org . eclipse . smarthome . core . types . State state = function . calculate ( items ) ; "<AssertPlaceHolder>" ; } createNumberItem ( java . lang . String , java . lang . Class , org . eclipse . smarthome . core . types . State ) { org . eclipse . smarthome . core . library . items . NumberItem item = new org . eclipse . smarthome . core . library . items . NumberItem ( ( ( ( org . eclipse . smarthome . core . library . CoreItemFactory . NUMBER ) + ":" ) + ( dimension . getSimpleName ( ) ) ) , name ) ; item . setUnitProvider ( unitProvider ) ; item . setState ( state ) ; return item ; }
org . junit . Assert . assertEquals ( new org . eclipse . smarthome . core . library . types . QuantityType < javax . measure . quantity . Temperature > ( "100<sp>C" ) , state )
isStringWithLowerCaseLessThanWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.id<sp>in<sp>(select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>lower(sub.stringAttribute)<sp><<sp>'just<sp>a<sp>string<sp>02')" ; final java . util . List < com . uaihebert . model . test . RegularEntityTwo > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityTwo . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > subQuery = uaiCriteria . subQuery ( "id" , com . uaihebert . model . test . RegularEntityOne . class ) ; subQuery . andLessThan ( true , "stringAttribute" , "Just<sp>a<sp>String<sp>02" ) ; uaiCriteria . andAttributeIn ( "id" , subQuery ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) )
getDistributedExceptionForHsClientThrowException ( ) { if ( ! ( com . taobao . adfs . database . DatabaseExecutorForHandlerSocket . class . getName ( ) . equals ( getRepository ( ) . conf . get ( "database.executor.class.name" ) ) ) ) return ; getRepository ( ) . checkThread . close ( ) ; getRepository ( ) . conf . set ( "database.executor.handlersocket.simulator.throw.exception.for.find" , java . util . concurrent . TimeoutException . class . getName ( ) ) ; try { getRepository ( ) . findByVersion ( 0 ) ; throw new java . io . IOException ( ) ; } catch ( java . lang . Throwable t ) { "<AssertPlaceHolder>" ; } } isNeedRestore ( java . lang . Throwable ) { while ( true ) { if ( ( t instanceof com . taobao . adfs . distributed . DistributedException ) && ( ( ( com . taobao . adfs . distributed . DistributedException ) ( t ) ) . needRestore ) ) return true ; if ( ( ( t . getMessage ( ) ) != null ) && ( t . getMessage ( ) . contains ( com . taobao . adfs . distributed . DistributedException . needRestoreFlag ) ) ) return true ; t = t . getCause ( ) ; if ( t == null ) return false ; } }
org . junit . Assert . assertThat ( com . taobao . adfs . distributed . DistributedException . isNeedRestore ( t ) , org . hamcrest . Matchers . is ( true ) )
testConvert ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . type . RelDataType rowType = builder . getTypeFactory ( ) . builder ( ) . add ( "a" , SqlTypeName . BIGINT ) . add ( "b" , SqlTypeName . VARCHAR , 10 ) . add ( "c" , SqlTypeName . VARCHAR , 10 ) . build ( ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "DEPT" ) . convert ( rowType , false ) . build ( ) ; final java . lang . String expected = "" + ( "LogicalProject(DEPTNO=[CAST($0):BIGINT<sp>NOT<sp>NULL],<sp>DNAME=[CAST($1):VARCHAR(10)<sp>NOT<sp>NULL],<sp>LOC=[CAST($2):VARCHAR(10)<sp>NOT<sp>NULL])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>DEPT]])\n" ) ; "<AssertPlaceHolder>" ; } hasTree ( java . lang . String ) { return org . apache . calcite . test . Matchers . compose ( org . hamcrest . core . Is . is ( value ) , ( input ) -> { return org . apache . calcite . util . Util . toLinux ( org . apache . calcite . plan . RelOptUtil . toString ( input ) ) ; } ) ; }
org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) )
testGetMentionsPagination ( ) { mockServer . expect ( requestTo ( "https://api.weibo.com/2/statuses/mentions.json?since_id=0&max_id=0&count=10&page=5&filter_by_author=0&filter_by_source=0&filter_by_type=0" ) ) . andExpect ( method ( org . springframework . social . weibo . api . impl . GET ) ) . andExpect ( header ( "Authorization" , "OAuth2<sp>accessToken" ) ) . andRespond ( withResponse ( jsonResource ( "timeline" ) , responseHeaders ) ) ; org . springframework . social . weibo . api . CursoredList < org . springframework . social . weibo . api . Status > statuses = timelineTemplate . getMentions ( 10 , 5 ) ; org . springframework . social . weibo . matcher . StatusMatcher . verifyStatusList ( statuses ) ; org . springframework . social . weibo . api . Status firstStatus = statuses . iterator ( ) . next ( ) ; org . springframework . social . weibo . matcher . StatusMatcher . verifyStatus ( firstStatus ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; }
org . junit . Assert . assertEquals ( "" , firstStatus . getText ( ) )
getHostNameTest ( ) { "<AssertPlaceHolder>" ; } getHostName ( ) { java . lang . String hostName = "" ; try { hostName = java . net . InetAddress . getLocalHost ( ) . getHostName ( ) ; } catch ( java . net . UnknownHostException e ) { org . gbif . ipt . utils . URLUtils . LOG . info ( "No<sp>IP<sp>address<sp>for<sp>the<sp>local<sp>hostname<sp>could<sp>be<sp>found" , e ) ; } return hostName ; }
org . junit . Assert . assertNotNull ( org . gbif . ipt . utils . URLUtils . getHostName ( ) )
testAppendEntries ( ) { final long start = 1000 ; org . apache . ratis . server . storage . LogSegment segment = org . apache . ratis . server . storage . LogSegment . newOpenSegment ( null , start ) ; long size = org . apache . ratis . server . storage . SegmentedRaftLogFormat . getHeaderLength ( ) ; final long max = ( 8 * 1024 ) * 1024 ; org . apache . ratis . server . storage . TestRaftLogSegment . checkLogSegment ( segment , start , ( start - 1 ) , true , size , 0 ) ; long term = 0 ; int i = 0 ; java . util . List < org . apache . ratis . proto . RaftProtos . LogEntryProto > list = new java . util . ArrayList ( ) ; while ( size < max ) { org . apache . ratis . RaftTestUtil . SimpleOperation op = new org . apache . ratis . RaftTestUtil . SimpleOperation ( ( "m" + i ) ) ; org . apache . ratis . proto . RaftProtos . LogEntryProto entry = org . apache . ratis . server . impl . ServerProtoUtils . toLogEntryProto ( op . getLogEntryContent ( ) , term , ( ( i ++ ) + start ) ) ; size += org . apache . ratis . server . storage . LogSegment . getEntrySize ( entry ) ; list . add ( entry ) ; } segment . appendToOpenSegment ( list . toArray ( new org . apache . ratis . proto . RaftProtos . LogEntryProto [ list . size ( ) ] ) ) ; "<AssertPlaceHolder>" ; org . apache . ratis . server . storage . TestRaftLogSegment . checkLogSegment ( segment , start , ( ( i - 1 ) + start ) , true , size , term ) ; } getTotalSize ( ) { return totalSize ; }
org . junit . Assert . assertTrue ( ( ( segment . getTotalSize ( ) ) >= max ) )
peek_Hit ( ) { cache . put ( org . cache2k . test . core . BasicLongCacheOperationsTest . KEY , org . cache2k . test . core . BasicLongCacheOperationsTest . VALUE ) ; statistics ( ) . putCount . expect ( 1 ) . expectAllZero ( ) ; "<AssertPlaceHolder>" ; statistics ( ) . getCount . expect ( 1 ) . missCount . expect ( 0 ) . expectAllZero ( ) ; } peek ( K ) { org . cache2k . processor . EntryProcessor < K , V , V > p = new org . cache2k . processor . EntryProcessor < K , V , V > ( ) { @ org . cache2k . test . core . Override public V process ( org . cache2k . processor . MutableCacheEntry < K , V > e ) throws org . cache2k . test . core . Exception { if ( ! ( e . exists ( ) ) ) { return null ; } return e . getValue ( ) ; } } ; return invoke ( key , p ) ; }
org . junit . Assert . assertNotNull ( cache . peek ( org . cache2k . test . core . BasicLongCacheOperationsTest . KEY ) )
shouldNotFindDeletedNodeInLabelScan ( ) { org . neo4j . internal . kernel . api . NodeTransactionStateTestBase . Node node = createNode ( "label" ) ; try ( org . neo4j . internal . kernel . api . org . neo4j . internal . kernel . api . Transaction tx = org . neo4j . internal . kernel . api . NodeTransactionStateTestBase . beginTransaction ( ) ; org . neo4j . internal . kernel . api . NodeLabelIndexCursor cursor = tx . cursors ( ) . allocateNodeLabelIndexCursor ( ) ) { tx . dataWrite ( ) . nodeDelete ( node . node ) ; tx . dataRead ( ) . nodeLabelScan ( node . labels [ 0 ] , cursor ) ; "<AssertPlaceHolder>" ; } } next ( ) { return false ; }
org . junit . Assert . assertFalse ( cursor . next ( ) )
testFailedGreaterThanWithEqualsComparison ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . gt ( "four" , 4 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ? "(.*)" : m_matches ; }
org . junit . Assert . assertEquals ( 0 , m_visitor . getMatches ( ) . size ( ) )
testSetPdxSerializationDetailsWhenPdxIsNotPersistent ( ) { final com . gemstone . gemfire . internal . cache . InternalCache mockCache = mockContext . mock ( com . gemstone . gemfire . internal . cache . InternalCache . class , "Cache" ) ; final com . gemstone . gemfire . cache . DiskStore mockDiskStore = mockContext . mock ( com . gemstone . gemfire . cache . DiskStore . class , "DiskStore" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockCache ) . getPdxPersistent ( ) ; will ( returnValue ( false ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . domain . DiskStoreDetails diskStoreDetails = new com . gemstone . gemfire . management . internal . cli . domain . DiskStoreDetails ( "testDiskStore" , "memberOne" ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( mockCache ) ; function . setPdxSerializationDetails ( mockCache , mockDiskStore , diskStoreDetails ) ; "<AssertPlaceHolder>" ; } isPdxSerializationMetaDataStored ( ) { return Boolean . TRUE . equals ( getPdxSerializationMetaDataStored ( ) ) ; }
org . junit . Assert . assertFalse ( diskStoreDetails . isPdxSerializationMetaDataStored ( ) )
header ( ) { com . asakusafw . dmdl . directio . text . tabular . ModelLoader loaded = generateJavaFromLines ( new java . lang . String [ ] { "};" 0 , "<sp>header<sp>=<sp>force," , ")" , "simple<sp>=<sp>{" , "<sp>a<sp>:<sp>TEXT;" , "<sp>b<sp>:<sp>TEXT;" , "};" } ) ; byte [ ] contents = restore ( loaded , loaded . newModel ( "Simple" ) . setOption ( "a" , new com . asakusafw . runtime . value . StringOption ( "};" 2 ) ) . setOption ( "b" , new com . asakusafw . runtime . value . StringOption ( "B" ) ) ) ; "<AssertPlaceHolder>" ; } text ( java . io . ByteArrayOutputStream ) { return text ( output . toByteArray ( ) ) ; }
org . junit . Assert . assertThat ( text ( contents ) , is ( "};" 1 ) )
testGetReceievedAddressesTest_nullMessageId_returnEmpty ( ) { java . util . Collection < java . lang . String > addresses = new java . util . ArrayList < java . lang . String > ( ) ; addresses . add ( "gm2552@cerner.com" ) ; final java . util . Set < java . lang . String > retAddresses = notifDao . getReceivedAddresses ( null , addresses ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , retAddresses . size ( ) )
testHandleSetText ( ) { handler = new org . eclipse . swt . internal . widgets . combokit . ComboOperationHandler ( combo ) ; handler . handleSet ( new org . eclipse . rap . json . JsonObject ( ) . add ( "text" , "abc" ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; }
org . junit . Assert . assertEquals ( "abc" , combo . getText ( ) )
testGetByPartitionIdNone ( ) { uk . ac . bbsrc . tgac . miso . core . data . SequencerPartitionContainer spc = dao . getSequencerPartitionContainerByPartitionId ( 9999L ) ; "<AssertPlaceHolder>" ; } getSequencerPartitionContainerByPartitionId ( long ) { currentSession ( ) . flush ( ) ; org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . impl . SequencerPartitionContainerImpl . class , "spc" ) ; criteria . createAlias ( "spc.partitions" , "ps" ) ; criteria . add ( org . hibernate . criterion . Restrictions . eq ( "ps.id" , partitionId ) ) ; uk . ac . bbsrc . tgac . miso . core . data . SequencerPartitionContainer record = ( ( uk . ac . bbsrc . tgac . miso . core . data . SequencerPartitionContainer ) ( criteria . uniqueResult ( ) ) ) ; return record ; }
org . junit . Assert . assertNull ( spc )
testEmptyModifyRewrite ( ) { java . lang . String str = "rule<sp>R<sp>\n" + ( ( ( ( ( ( "no-loop<sp>\n" + "when\n" ) + "<sp>$s<sp>:<sp>String()" ) + "then\n" ) + "<sp>System.out.println(\"intentional<sp>empty<sp>modify<sp>on<sp>$s\"<sp>+<sp>$s);" ) + "<sp>modify(<sp>$s<sp>)<sp>{<sp>}\n" ) + "end" ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( "Hello<sp>World" ) ; int fired = ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , fired )
testFindNoMatchingEmptyList ( ) { org . eclipse . mylyn . internal . gerrit . core . egit . GerritToGitMapping mapping = createTestMapping ( createRepositories ( ) ) ; "<AssertPlaceHolder>" ; } find ( ) { if ( ( gerritProject ) == null ) { return null ; } gerritHost = getHostFromUrl ( getGitDaemonUrl ( ) ) ; if ( ( gerritHost ) != null ) { findMatchingRepository ( ) ; } if ( ( repository ) == null ) { gerritHost = getHostFromUrl ( taskRepository . getRepositoryUrl ( ) ) ; if ( ( gerritHost ) != null ) { findMatchingRepository ( ) ; } } return repository ; }
org . junit . Assert . assertNull ( mapping . find ( ) )
testInvokePathEmptyAllowed ( ) { org . apache . cxf . Bus bus = org . apache . cxf . BusFactory . newInstance ( ) . createBus ( ) ; bus . setProperty ( "allow.empty.path.template.value" , true ) ; org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean bean = new org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean ( ) ; bean . setBus ( bus ) ; bean . setAddress ( "http://bar" ) ; bean . setResourceClass ( org . apache . cxf . jaxrs . resources . BookInterface . class ) ; org . apache . cxf . jaxrs . resources . BookInterface store = bean . create ( org . apache . cxf . jaxrs . resources . BookInterface . class ) ; "<AssertPlaceHolder>" ; } getBook ( long ) { for ( Map . Entry < java . lang . Long , org . apache . cxf . customer . book . Book > me : books . entrySet ( ) ) { System . out . println ( ( ( ( ( ( "getBook<sp>-><sp>" + ( me . getKey ( ) ) ) + "<sp>:<sp>" ) + ( me . getValue ( ) . getName ( ) ) ) + ",<sp>" ) + ( me . getValue ( ) . getId ( ) ) ) ) ; } System . out . println ( ( "The<sp>Book's<sp>id<sp>" + bookid ) ) ; org . apache . cxf . customer . book . Book b = books . get ( bookid ) ; if ( b == null ) { org . apache . cxf . customer . book . BookNotFoundDetails details = new org . apache . cxf . customer . book . BookNotFoundDetails ( ) ; details . setId ( bookid ) ; throw new org . apache . cxf . customer . book . BookNotFoundFault ( details ) ; } return b ; }
org . junit . Assert . assertNotNull ( store . getBook ( "" ) )
testDotTxt ( ) { com . sun . jersey . api . client . WebResource webResource = resource ( ) ; java . lang . String response = webResource . path ( "preliminaryapp" ) . path ( "oneandtwo" ) . path ( "txt" ) . path ( "test.txt" ) . get ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return core . get ( key ) ; }
org . junit . Assert . assertEquals ( "test.txt" , response )
testLargeBatchInProgress ( ) { long count = 10 ; long loops = 1000 ; long total = count * loops ; java . util . concurrent . atomic . AtomicLong result = new java . util . concurrent . atomic . AtomicLong ( 0 ) ; org . opennms . core . tasks . BatchTask task = new org . opennms . core . tasks . BatchTask ( m_coordinator , null ) ; task . add ( scheduler ( task , result , 1 , count , ( loops - 1 ) ) ) ; task . schedule ( ) ; task . waitFor ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return m_engineConfiguration ; }
org . junit . Assert . assertEquals ( ( ( total * ( total + 1 ) ) / 2 ) , result . get ( ) )
whenLoadPlusDeliverySizeDoesNotExceedsVehicleCapacity_itShouldReturnTrue ( ) { com . graphhopper . jsprit . core . problem . job . Service service = mock ( com . graphhopper . jsprit . core . problem . job . Delivery . class ) ; when ( service . getSize ( ) ) . thenReturn ( Capacity . Builder . newInstance ( ) . addDimension ( 0 , 1 ) . addDimension ( 1 , 1 ) . addDimension ( 2 , 1 ) . build ( ) ) ; com . graphhopper . jsprit . core . problem . misc . JobInsertionContext iContext = mock ( com . graphhopper . jsprit . core . problem . misc . JobInsertionContext . class ) ; when ( iContext . getJob ( ) ) . thenReturn ( service ) ; when ( iContext . getRoute ( ) ) . thenReturn ( route ) ; when ( iContext . getNewVehicle ( ) ) . thenReturn ( vehicle ) ; "<AssertPlaceHolder>" ; } fulfilled ( com . graphhopper . jsprit . core . problem . misc . JobInsertionContext ) { for ( java . lang . String skill : insertionContext . getJob ( ) . getRequiredSkills ( ) . values ( ) ) { if ( ! ( insertionContext . getNewVehicle ( ) . getSkills ( ) . containsSkill ( skill ) ) ) { return false ; } } com . graphhopper . jsprit . core . problem . Skills requiredSkillsForRoute = states . getRouteState ( insertionContext . getRoute ( ) , InternalStates . SKILLS , com . graphhopper . jsprit . core . problem . Skills . class ) ; if ( requiredSkillsForRoute == null ) requiredSkillsForRoute = com . graphhopper . jsprit . core . problem . constraint . HardSkillConstraint . defaultSkills ; for ( java . lang . String skill : requiredSkillsForRoute . values ( ) ) { if ( ! ( insertionContext . getNewVehicle ( ) . getSkills ( ) . containsSkill ( skill ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( constraint . fulfilled ( iContext ) )
should_adjust_call_bounds_based_on_best_soft_clip ( ) { au . edu . wehi . idsv . StructuralVariationCallBuilder builder = new au . edu . wehi . idsv . StructuralVariationCallBuilder ( getContext ( ) , ( ( au . edu . wehi . idsv . VariantContextDirectedEvidence ) ( new au . edu . wehi . idsv . IdsvVariantContextBuilder ( getContext ( ) ) { { breakpoint ( new au . edu . wehi . idsv . BreakpointSummary ( 0 , FWD , 14 , 12 , 14 , 1 , BWD , 11 , 11 , 11 ) , "GTAC" ) ; phredScore ( 20 ) ; } } . make ( ) ) ) ) ; java . util . List < au . edu . wehi . idsv . DirectedEvidence > evidence = new java . util . ArrayList < au . edu . wehi . idsv . DirectedEvidence > ( ) ; evidence . add ( SR ( withSequence ( "NNNN" , Read ( 0 , 12 , "1M3S" ) ) [ 0 ] , withSequence ( "NNN" , withMapq ( 14 , Read ( 1 , 11 , "3M" ) ) ) [ 0 ] ) ) ; for ( au . edu . wehi . idsv . DirectedEvidence e : evidence ) { builder . addEvidence ( e ) ; } au . edu . wehi . idsv . VariantContextDirectedEvidence call = builder . make ( ) ; "<AssertPlaceHolder>" ; } getBreakendSummary ( ) { return ( ( au . edu . wehi . idsv . BreakpointSummary ) ( super . getBreakendSummary ( ) ) ) ; }
org . junit . Assert . assertEquals ( new au . edu . wehi . idsv . BreakpointSummary ( 0 , FWD , 12 , 12 , 12 , 1 , BWD , 11 , 11 , 11 ) , call . getBreakendSummary ( ) )
testBuildWithSingleOrderBy ( ) { java . lang . String query = "SELECT<sp>FROM<sp>SMTH<sp>%s" ; java . lang . String condition = "condition<sp>" ; java . lang . Object parameter = new java . lang . Object ( ) ; java . lang . String condition1 = "condition1<sp>" ; java . lang . Object nullParameter = null ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name1" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 ) ; java . lang . String expected = "SELECT<sp>FROM<sp>SMTH<sp>WHERE<sp>condition<sp>ORDER<sp>BY<sp>e.name1<sp>ASC" ; java . lang . String actual = org . lnu . is . dao . builder . BaseQueryBuilder . getInstance ( query ) . where ( ) . addOrCondition ( condition , parameter ) . addOrCondition ( condition1 , nullParameter ) . orderBy ( orders ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return getFinalQuery ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testMetaComparatorTableKeysWithCommaOk ( ) { org . apache . hadoop . hbase . CellComparator c = CellComparatorImpl . META_COMPARATOR ; long now = java . lang . System . currentTimeMillis ( ) ; org . apache . hadoop . hbase . KeyValue a = new org . apache . hadoop . hbase . KeyValue ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "table,key,with,commas1,1234" ) , now ) ; org . apache . hadoop . hbase . KeyValue b = new org . apache . hadoop . hbase . KeyValue ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "table,key,with,commas2,0123" ) , now ) ; "<AssertPlaceHolder>" ; } compare ( byte [ ] , byte [ ] ) { return delegate . compareRows ( new org . apache . hadoop . hbase . KeyValue . KeyOnlyKeyValue ( left ) , right , 0 , right . length ) ; }
org . junit . Assert . assertTrue ( ( ( c . compare ( a , b ) ) < 0 ) )
readProcessWithContract ( ) { final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder builder = new org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder ( ) . createNewInstance ( "contract" , "1.0" ) ; builder . addActor ( "myActor" ) ; final org . bonitasoft . engine . bpm . process . impl . ContractDefinitionBuilder contractDefinitionBuilder = builder . addUserTask ( "step1" , "myActor" ) . addContract ( ) ; createContract ( contractDefinitionBuilder ) ; createContract ( builder . addContract ( ) ) ; final org . bonitasoft . engine . bpm . process . DesignProcessDefinition process = builder . getProcess ( ) ; final org . bonitasoft . engine . bpm . process . DesignProcessDefinition result = getDesignProcessDefinition ( builder ) ; "<AssertPlaceHolder>" . isEqualTo ( result ) ; } getDesignProcessDefinition ( org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder ) { final org . bonitasoft . engine . bpm . process . DesignProcessDefinition process = builder . done ( ) ; final org . bonitasoft . engine . bpm . bar . BusinessArchive businessArchive = new org . bonitasoft . engine . bpm . bar . BusinessArchiveBuilder ( ) . createNewBusinessArchive ( ) . setProcessDefinition ( process ) . done ( ) ; org . bonitasoft . engine . bpm . bar . BusinessArchiveFactory . writeBusinessArchiveToFile ( businessArchive , barFile ) ; final java . io . InputStream inputStream = new java . io . FileInputStream ( barFile ) ; try { final org . bonitasoft . engine . bpm . bar . BusinessArchive businessArchive2 = org . bonitasoft . engine . bpm . bar . BusinessArchiveFactory . readBusinessArchive ( inputStream ) ; return businessArchive2 . getProcessDefinition ( ) ; } finally { inputStream . close ( ) ; } }
org . junit . Assert . assertThat ( process )
test31 ( ) { byte [ ] packet = new byte [ ] { ( ( byte ) ( 255 ) ) } ; com . github . mpjct . jmpjct . mysql . proto . Proto proto = new com . github . mpjct . jmpjct . mysql . proto . Proto ( packet ) ; java . util . ArrayList < byte [ ] > payload = new java . util . ArrayList < byte [ ] > ( ) ; payload . add ( com . github . mpjct . jmpjct . mysql . proto . Proto . build_fixed_str ( packet . length , proto . get_fixed_str ( packet . length , true ) , true ) ) ; "<AssertPlaceHolder>" ; } arraylist_to_array ( java . util . ArrayList ) { int size = 0 ; for ( byte [ ] field : input ) size += field . length ; byte [ ] result = new byte [ size ] ; int offset = 0 ; for ( byte [ ] field : input ) { java . lang . System . arraycopy ( field , 0 , result , offset , field . length ) ; offset += field . length ; } return result ; }
org . junit . Assert . assertArrayEquals ( packet , com . github . mpjct . jmpjct . mysql . proto . Proto . arraylist_to_array ( payload ) )
testSaveTwoRootObjectsWithNoType ( ) { com . fasterxml . jackson . databind . JsonNode expected = mapper . createArrayNode ( ) . add ( mapper . createObjectNode ( ) . put ( "userId" , "1" ) . put ( "name" , "Paul" ) ) . add ( mapper . createObjectNode ( ) . put ( "userId" , "2" ) . put ( "name" , "Anna" ) . put ( "sex" , "FEMALE" ) ) ; org . emfjson . jackson . tests . User u1 = ModelFactory . eINSTANCE . createUser ( ) ; u1 . setUserId ( "1" ) ; u1 . setName ( "Paul" ) ; org . emfjson . jackson . tests . User u2 = ModelFactory . eINSTANCE . createUser ( ) ; u2 . setUserId ( "2" ) ; u2 . setName ( "Anna" ) ; u2 . setSex ( Sex . FEMALE ) ; org . eclipse . emf . ecore . resource . Resource resource = new org . emfjson . jackson . resource . JsonResource ( org . eclipse . emf . common . util . URI . createURI ( "test" ) , mapper ) ; resource . getContents ( ) . add ( u1 ) ; resource . getContents ( ) . add ( u2 ) ; com . fasterxml . jackson . databind . JsonNode result = mapper . valueToTree ( resource ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , result )
filtersNotForPlayer ( ) { java . util . Set < com . fundynamic . d2tm . game . entities . Entity > result = entitiesSet . filter ( new com . fundynamic . d2tm . game . entities . predicates . NotPredicate ( com . fundynamic . d2tm . game . entities . predicates . BelongsToPlayer . instance ( player ) ) ) ; "<AssertPlaceHolder>" ; } instance ( com . fundynamic . d2tm . game . entities . Player ) { if ( ! ( com . fundynamic . d2tm . game . entities . predicates . BelongsToPlayer . instances . containsKey ( playerItShouldBelongTo ) ) ) { com . fundynamic . d2tm . game . entities . predicates . BelongsToPlayer . instances . put ( playerItShouldBelongTo , new com . fundynamic . d2tm . game . entities . predicates . BelongsToPlayer ( playerItShouldBelongTo ) ) ; } return com . fundynamic . d2tm . game . entities . predicates . BelongsToPlayer . instances . get ( playerItShouldBelongTo ) ; }
org . junit . Assert . assertEquals ( 6 , result . size ( ) )
slaveDownConnection ( ) { java . lang . String url = ( ( ( ( ( ( ( ( ( ( "jdbc:mariadb:replication//" + ( hostname ) ) + ( ( port ) == 0 ? "" : ":" + ( port ) ) ) + "," ) + ( hostname ) ) + ":8888" ) + "/" ) + ( database ) ) + "?user=" ) + ( username ) ) + ( ( password ) != null ? "&password=" + ( password ) : "" ) ) + "&retriesAllDown=10&allowMasterDownConnection" ; try ( java . sql . Connection connection = java . sql . DriverManager . getConnection ( url ) ) { "<AssertPlaceHolder>" ; connection . isValid ( 0 ) ; try ( java . sql . PreparedStatement preparedStatement = connection . prepareStatement ( "SELECT<sp>1" ) ) { preparedStatement . executeQuery ( ) ; } connection . setReadOnly ( true ) ; try ( java . sql . PreparedStatement preparedStatement = connection . prepareStatement ( "SELECT<sp>1" ) ) { preparedStatement . executeQuery ( ) ; } } } isReadOnly ( ) { return false ; }
org . junit . Assert . assertFalse ( connection . isReadOnly ( ) )
testGetSETDIFF ( ) { java . lang . String actual = table . getSETDIFF ( ) ; java . lang . String expected = "\\" ; "<AssertPlaceHolder>" ; } getSETDIFF ( ) { return "\\" ; }
org . junit . Assert . assertEquals ( expected , actual )
goodTests ( ) { for ( java . lang . String test : regex . EmailValidatorTest . goodTests ) { "<AssertPlaceHolder>" ; } } valid ( java . lang . String ) { return regex . EmailValidator . EMAIL_PATTERN . matcher ( email ) . matches ( ) ; }
org . junit . Assert . assertTrue ( test , regex . EmailValidator . valid ( test ) )
testExtractMinuteTimestamp ( ) { java . lang . String sqlText = ( "select<sp>ts,<sp>EXTRACT(MINUTE<sp>FROM<sp>ts)<sp>as<sp>\"MINUTE\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>2012-12-31<sp>20:38:40.0<sp>|<sp>38<sp>|\n" 0 ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "TS<sp>|MINUTE<sp>|\n" + ( ( ( ( ( ( "--------------------------------\n" + "2009-01-02<sp>11:22:33.04<sp>|<sp>22<sp>|\n" ) + "2009-07-02<sp>11:22:33.04<sp>|<sp>22<sp>|\n" ) + "2009-09-02<sp>11:22:33.04<sp>|<sp>22<sp>|\n" ) + "<sp>2012-12-31<sp>20:38:40.0<sp>|<sp>38<sp>|\n" 1 ) + "<sp>2012-12-31<sp>20:38:40.0<sp>|<sp>38<sp>|\n" ) + "2013-12-31<sp>05:22:33.04<sp>|<sp>22<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testNoLockFileWithPersistenceFalse ( ) { java . nio . file . Path journalDir = java . nio . file . Paths . get ( org . apache . activemq . artemis . core . server . impl . EmbeddedServerTest . SERVER_JOURNAL_DIR , org . apache . activemq . artemis . core . server . impl . EmbeddedServerTest . SERVER_LOCK_NAME ) ; boolean lockExists = java . nio . file . Files . exists ( journalDir ) ; "<AssertPlaceHolder>" ; } get ( javax . ws . rs . core . UriInfo , javax . servlet . http . HttpServletRequest ) { ActiveMQRestLogger . LOGGER . debug ( ( ( ( ( ( "Handling<sp>GET<sp>request<sp>for<sp>\"" + ( destination ) ) + "\"<sp>from<sp>" ) + ( requestContext . getRemoteAddr ( ) ) ) + "<queue>" 0 ) + ( requestContext . getRemotePort ( ) ) ) ) ; java . lang . StringBuilder msg = new java . lang . StringBuilder ( ) ; msg . append ( "<queue>" ) . append ( "<name>" ) . append ( destination ) . append ( "</name>" ) . append ( "<atom:link<sp>rel=\"create\"<sp>href=\"" ) . append ( createSenderLink ( uriInfo ) ) . append ( "\"<queue>" 2 ) . append ( "<atom:link<sp>rel=\"create-with-id\"<sp>href=\"" < queue > "3\"<queue>" 2 ) . append ( "<atom:link<sp>rel=\"pull-consumers\"<sp>href=\"" < queue > "1\"<queue>" 2 ) . append ( "<atom:link<sp>rel=\"push-consumers\"<sp>href=\"" ) . append ( createPushConsumersLink ( uriInfo ) ) . append ( "\"<queue>" 2 ) . append ( "<queue>" 4 ) ; javax . ws . rs . core . Response . ResponseBuilder builder = javax . ws . rs . core . Response . ok ( msg . toString ( ) ) ; setSenderLink ( builder , uriInfo ) ; setSenderWithIdLink ( builder , uriInfo ) ; setConsumersLink ( builder , uriInfo ) ; setPushConsumersLink ( builder , uriInfo ) ; return builder . build ( ) ; }
org . junit . Assert . assertFalse ( lockExists )
testSize ( ) { bsonArray . add ( "wibble" ) ; bsonArray . add ( true ) ; bsonArray . add ( 123 ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , bsonArray . size ( ) )
testCountRows ( ) { org . apache . accumulo . core . client . Connector conn = tester . getConnector ( ) ; final java . lang . String tA ; { java . lang . String [ ] names = getUniqueNames ( 1 ) ; tA = names [ 0 ] ; } { java . util . Map < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > input = new java . util . HashMap ( ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v0" , "" , "v1" ) , new org . apache . accumulo . core . data . Value ( "5" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v1" , "" , "v2" ) , new org . apache . accumulo . core . data . Value ( "2" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v2" , "" , "v0" ) , new org . apache . accumulo . core . data . Value ( "4" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v0" , "" , "vBig" ) , new org . apache . accumulo . core . data . Value ( "7" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v1" , "" , "vBig" ) , new org . apache . accumulo . core . data . Value ( "7" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; input . put ( new org . apache . accumulo . core . data . Key ( "v2" , "" , "vBig" ) , new org . apache . accumulo . core . data . Value ( "7" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; java . util . SortedSet < org . apache . hadoop . io . Text > splits = new java . util . TreeSet ( ) ; splits . add ( new org . apache . hadoop . io . Text ( "v15" ) ) ; edu . mit . ll . graphulo . util . TestUtil . createTestTable ( conn , tA , splits , input ) ; } edu . mit . ll . graphulo . Graphulo g = new edu . mit . ll . graphulo . Graphulo ( conn , tester . getPassword ( ) ) ; long cnt = g . countRows ( tA ) ; long expect = 3 ; "<AssertPlaceHolder>" ; conn . tableOperations ( ) . delete ( tA ) ; } countRows ( java . lang . String ) { com . google . common . base . Preconditions . checkArgument ( ( ( table != null ) && ( ! ( table . isEmpty ( ) ) ) ) ) ; org . apache . accumulo . core . client . BatchScanner bs ; try { bs = connector . createBatchScanner ( table , Authorizations . EMPTY , 50 ) ; } catch ( org . apache . accumulo . core . client . TableNotFoundException e ) { edu . mit . ll . graphulo . Graphulo . log . error ( ( ( "table<sp>" + table ) + "<sp>does<sp>not<sp>exist" ) , e ) ; throw new java . lang . RuntimeException ( e ) ; } bs . setRanges ( java . util . Collections . singleton ( new org . apache . accumulo . core . data . Range ( ) ) ) ; new edu . mit . ll . graphulo . DynamicIteratorSetting ( 10 , null ) . append ( edu . mit . ll . graphulo . apply . KeyRetainOnlyApply . iteratorSetting ( 1 , PartialKey . ROW ) ) . append ( new org . apache . accumulo . core . client . IteratorSetting ( 1 , org . apache . accumulo . core . iterators . user . VersioningIterator . class ) ) . append ( edu . mit . ll . graphulo . simplemult . ConstantTwoScalar . iteratorSetting ( 1 , new org . apache . accumulo . core . data . Value ( "1" . getBytes ( StandardCharsets . UTF_8 ) ) ) ) . append ( edu . mit . ll . graphulo . apply . KeyRetainOnlyApply . iteratorSetting ( 1 , null ) ) . append ( edu . mit . ll . graphulo . Graphulo . PLUS_ITERATOR_BIGDECIMAL ) . addToScanner ( bs ) ; long cnt = 0L ; try { for ( Map . Entry < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > entry : bs ) { cnt += java . lang . Long . parseLong ( new java . lang . String ( entry . getValue ( ) . get ( ) , java . nio . charset . StandardCharsets . UTF_8 ) ) ; } } finally { bs . close ( ) ; } return cnt ; }
org . junit . Assert . assertEquals ( expect , cnt )
intValue ( ) { "<AssertPlaceHolder>" ; } get ( long ) { org . sejda . sambox . cos . COSInteger value = org . sejda . sambox . cos . COSInteger . CACHE . get ( key ) ; if ( value == null ) { final org . sejda . sambox . cos . COSInteger newVal = new org . sejda . sambox . cos . COSInteger ( key ) ; value = org . sejda . sambox . cos . COSInteger . CACHE . putIfAbsent ( key , newVal ) ; if ( value == null ) { value = newVal ; } } return value ; }
org . junit . Assert . assertEquals ( 20 , org . sejda . sambox . cos . COSInteger . get ( 20 ) . intValue ( ) )
testGetEdgeNodeId ( ) { java . lang . String edgeNodeId = "edgenode01" ; org . powermock . reflect . Whitebox . setInternalState ( target , "edgeNodeId" , edgeNodeId ) ; "<AssertPlaceHolder>" ; } getEdgeNodeId ( ) { return edgeNodeId ; }
org . junit . Assert . assertThat ( target . getEdgeNodeId ( ) , org . hamcrest . CoreMatchers . is ( edgeNodeId ) )
testSetTag_Tag ( ) { co . nstant . in . cbor . model . DataItem di = new co . nstant . in . cbor . model . DataItem ( MajorType . UNSIGNED_INTEGER ) ; di . setTag ( new co . nstant . in . cbor . model . Tag ( 1 ) ) ; "<AssertPlaceHolder>" ; } getTag ( ) { return tag ; }
org . junit . Assert . assertNotNull ( di . getTag ( ) )
testRemoveFromHintMapDecodeHintType ( ) { com . google . zxing . DecodeHintType hintType = com . google . zxing . DecodeHintType . TRY_HARDER ; org . apache . camel . dataformat . barcode . BarcodeDataFormat instance = new org . apache . camel . dataformat . barcode . BarcodeDataFormat ( ) ; instance . removeFromHintMap ( hintType ) ; "<AssertPlaceHolder>" ; } getReaderHintMap ( ) { return readerHintMap ; }
org . junit . Assert . assertFalse ( instance . getReaderHintMap ( ) . containsKey ( hintType ) )
getNativeClient ( ) { final java . lang . Object nativeClient = clientWrapper . getNativeClient ( ) ; "<AssertPlaceHolder>" ; } getNativeClient ( ) { return memcachedClient ; }
org . junit . Assert . assertSame ( client , nativeClient )
test15 ( ) { org . demoiselle . jee . core . api . security . DemoiselleUser expResult = dml ; org . demoiselle . jee . core . api . security . DemoiselleUser result = instance . getUser ( ) ; "<AssertPlaceHolder>" ; } getIdentity ( ) { return identity ; }
org . junit . Assert . assertEquals ( expResult . getIdentity ( ) , result . getIdentity ( ) )
testGettingAnExistingRootCategoryReturnsTheCategory ( ) { org . pentaho . marketplace . domain . model . factories . interfaces . ICategoryFactory factory = this . createFactory ( ) ; java . lang . String name = "RootCategory" ; org . pentaho . marketplace . domain . model . entities . interfaces . ICategory expectedRootCategory = factory . create ( name ) ; org . pentaho . marketplace . domain . model . entities . interfaces . ICategory actualRootCategory = factory . get ( name ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . pentaho . marketplace . domain . model . factories . CategoryFactory . categories . get ( name ) ; }
org . junit . Assert . assertSame ( expectedRootCategory , actualRootCategory )
shouldRejectWeightJustAboveCeiling ( ) { node . setWeight ( 101 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( node , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( result . passedValidation ( ) )
testGetClusterId ( ) { "<AssertPlaceHolder>" ; } getClusterId ( ) { return clusterId ; }
org . junit . Assert . assertEquals ( clusterId , monitor . getClusterId ( ) )
getDbclientAfterCloseThrows ( ) { com . google . cloud . spanner . SpannerImpl imp = new com . google . cloud . spanner . SpannerImpl ( rpc , 1 , spannerOptions ) ; java . util . Map < java . lang . String , java . lang . String > labels = new java . util . HashMap ( ) ; labels . put ( "env" , "dev" ) ; org . mockito . Mockito . when ( spannerOptions . getSessionLabels ( ) ) . thenReturn ( labels ) ; java . lang . String dbName = "projects/p1/instances/i1/databases/d1" ; com . google . cloud . spanner . DatabaseId db = com . google . cloud . spanner . DatabaseId . of ( dbName ) ; org . mockito . Mockito . when ( spannerOptions . getTransportOptions ( ) ) . thenReturn ( com . google . cloud . grpc . GrpcTransportOptions . newBuilder ( ) . build ( ) ) ; org . mockito . Mockito . when ( spannerOptions . getSessionPoolOptions ( ) ) . thenReturn ( com . google . cloud . spanner . SessionPoolOptions . newBuilder ( ) . build ( ) ) ; imp . close ( ) ; try { imp . getDatabaseClient ( db ) ; org . junit . Assert . fail ( "Expected<sp>exception" ) ; } catch ( java . lang . IllegalStateException e ) { "<AssertPlaceHolder>" . contains ( "Cloud<sp>Spanner<sp>client<sp>has<sp>been<sp>closed" ) ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertThat ( e . getMessage ( ) )
testForCorrectSeparatorBytes2 ( ) { java . lang . Object [ ] o1 = new java . lang . Object [ ] { "a" , "b" } ; java . lang . Object [ ] o2 = new java . lang . Object [ ] { "c" , "d" , "e" } ; org . apache . phoenix . schema . types . PDataType type = org . apache . phoenix . schema . types . PVarcharArray . INSTANCE ; org . apache . phoenix . schema . types . PDataType base = org . apache . phoenix . schema . types . PVarchar . INSTANCE ; org . apache . phoenix . schema . types . PhoenixArray arr1 = new org . apache . phoenix . schema . types . PhoenixArray ( base , o1 ) ; org . apache . phoenix . schema . types . PhoenixArray arr2 = new org . apache . phoenix . schema . types . PhoenixArray ( base , o2 ) ; org . apache . phoenix . expression . LiteralExpression array1Literal ; org . apache . phoenix . expression . LiteralExpression array2Literal ; array1Literal = org . apache . phoenix . expression . LiteralExpression . newConstant ( arr1 , type , null , null , SortOrder . ASC , Determinism . ALWAYS ) ; array2Literal = org . apache . phoenix . expression . LiteralExpression . newConstant ( arr2 , type , null , null , SortOrder . DESC , Determinism . ALWAYS ) ; java . util . List < org . apache . phoenix . expression . Expression > expressions = com . google . common . collect . Lists . newArrayList ( ( ( org . apache . phoenix . expression . Expression ) ( array1Literal ) ) ) ; expressions . add ( array2Literal ) ; org . apache . phoenix . expression . Expression arrayConcatFunction = new org . apache . phoenix . expression . function . ArrayConcatFunction ( expressions ) ; org . apache . hadoop . hbase . io . ImmutableBytesWritable ptr = new org . apache . hadoop . hbase . io . ImmutableBytesWritable ( ) ; arrayConcatFunction . evaluate ( null , ptr ) ; byte [ ] expected = new byte [ ] { 97 , 0 , 98 , 0 , 99 , 0 , 100 , 0 , 101 , 0 , 0 , 0 , - 128 , 1 , - 128 , 3 , - 128 , 5 , - 128 , 7 , - 128 , 9 , 0 , 0 , 0 , 12 , 0 , 0 , 0 , 5 , 1 } ; "<AssertPlaceHolder>" ; } get ( ) { return this . tableName ; }
org . junit . Assert . assertArrayEquals ( expected , ptr . get ( ) )
testAofClose ( ) { com . moilioncircle . redis . replicator . Replicator r = new com . moilioncircle . redis . replicator . RedisReplicator ( com . moilioncircle . redis . replicator . CloseTest . class . getClassLoader ( ) . getResourceAsStream ( "appendonly5.aof" ) , FileType . AOF , com . moilioncircle . redis . replicator . Configuration . defaultSetting ( ) ) ; final java . util . concurrent . atomic . AtomicInteger acc = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; r . addEventListener ( new com . moilioncircle . redis . replicator . event . EventListener ( ) { @ com . moilioncircle . redis . replicator . Override public void onEvent ( com . moilioncircle . redis . replicator . Replicator replicator , com . moilioncircle . redis . replicator . event . Event event ) { if ( event instanceof com . moilioncircle . redis . replicator . cmd . Command ) { acc . incrementAndGet ( ) ; if ( ( acc . get ( ) ) == 30 ) { try { replicator . close ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } } } } ) ; r . open ( ) ; "<AssertPlaceHolder>" ; } open ( ) { this . sentinel . open ( ) ; }
org . junit . Assert . assertEquals ( 30 , acc . get ( ) )
findByExampleShouldReturnEmptyListIfNotMatching ( ) { org . springframework . data . mongodb . core . QueryByExampleTests . Person sample = new org . springframework . data . mongodb . core . QueryByExampleTests . Person ( ) ; sample . firstname = "jon" ; sample . firstname = "stark" ; org . springframework . data . mongodb . core . query . Query query = new org . springframework . data . mongodb . core . query . Query ( new org . springframework . data . mongodb . core . query . Criteria ( ) . alike ( org . springframework . data . domain . Example . of ( sample ) ) ) ; java . util . List < org . springframework . data . mongodb . core . QueryByExampleTests . Person > result = operations . find ( query , org . springframework . data . mongodb . core . QueryByExampleTests . Person . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result , is ( empty ( ) ) )
testUUIDPrimaryKeyV1 ( ) { log . info ( "...<sp>testUUIDPrimaryKeyV1<sp>..." ) ; javax . persistence . EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; org . thoughts . on . java . model . Book b = new org . thoughts . on . java . model . Book ( ) ; b . setTitle ( "Hibernate<sp>Tips" ) ; log . info ( "Persist<sp>new<sp>Book<sp>entity." ) ; em . persist ( b ) ; log . info ( "Call<sp>flush" ) ; em . flush ( ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; java . util . UUID uuid = b . getId ( ) ; b = em . find ( org . thoughts . on . java . model . Book . class , uuid ) ; "<AssertPlaceHolder>" ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( uuid , b . getId ( ) )
appendMockChecking_A$StringBuilder$int_depth0 ( ) { java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; int depth = 0 ; generator . appendMockChecking ( buf , depth ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . name ; }
org . junit . Assert . assertEquals ( "" , buf . toString ( ) )
removeRowThroughContainer_nonexistingRowId_shouldFail ( ) { com . vaadin . v7 . data . util . sqlcontainer . query . TableQuery tQuery = new com . vaadin . v7 . data . util . sqlcontainer . query . TableQuery ( "people" , connectionPool , com . vaadin . v7 . data . util . sqlcontainer . SQLTestsConstants . sqlGen ) ; com . vaadin . v7 . data . util . sqlcontainer . SQLContainer container = new com . vaadin . v7 . data . util . sqlcontainer . SQLContainer ( tQuery ) ; container . setAutoCommit ( true ) ; "<AssertPlaceHolder>" ; } removeItem ( java . lang . Object ) { if ( ! ( containsId ( itemId ) ) ) { return false ; } for ( com . vaadin . v7 . data . util . sqlcontainer . RowItem item : addedItems ) { if ( item . getId ( ) . equals ( itemId ) ) { addedItems . remove ( item ) ; fireContentsChange ( ) ; return true ; } } if ( autoCommit ) { com . vaadin . v7 . data . util . sqlcontainer . SQLContainer . getLogger ( ) . log ( Level . SEVERE , "Failed<sp>to<sp>rollback<sp>row<sp>removal" , ee ) ; } throw e ; } } else { removedItems . put ( ( ( com . vaadin . v7 . data . util . sqlcontainer . RowId ) ( itemId ) ) , ( ( com . vaadin . v7 . data . util . sqlcontainer . RowItem ) ( getItem ( itemId ) ) ) ) ; cachedItems . remove ( itemId ) ; refresh ( ) ; return true ; } }
org . junit . Assert . assertFalse ( container . removeItem ( "foo" ) )
instanceStatusStats ( ) { populateInstance ( false ) ; java . lang . String statusRequest = "instance:stats" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController , statusRequest , org . slf4j . LoggerFactory . getLogger ( org . apache . nifi . minifi . status . StatusConfigReporterTest . class ) ) ; org . apache . nifi . minifi . commons . status . FlowStatusReport expected = new org . apache . nifi . minifi . commons . status . FlowStatusReport ( ) ; expected . setErrorsGeneratingReport ( Collections . EMPTY_LIST ) ; addInstanceStatus ( expected , false , true , false , false ) ; "<AssertPlaceHolder>" ; } addInstanceStatus ( org . apache . nifi . minifi . commons . status . FlowStatusReport , boolean , boolean , boolean , boolean ) { org . apache . nifi . minifi . commons . status . instance . InstanceStatus instanceStatus = new org . apache . nifi . minifi . commons . status . instance . InstanceStatus ( ) ; if ( addHealth ) { org . apache . nifi . minifi . commons . status . instance . InstanceHealth instanceHealth = new org . apache . nifi . minifi . commons . status . instance . InstanceHealth ( ) ; instanceHealth . setQueuedContentSize ( 1L ) ; instanceHealth . setQueuedCount ( 2 ) ; instanceHealth . setActiveThreads ( 3 ) ; instanceHealth . setHasBulletins ( populateBulletins ) ; instanceStatus . setInstanceHealth ( instanceHealth ) ; } if ( addBulletins ) { if ( populateBulletins ) { org . apache . nifi . minifi . commons . status . common . BulletinStatus bulletinStatus = new org . apache . nifi . minifi . commons . status . common . BulletinStatus ( ) ; bulletinStatus . setMessage ( "Bulletin<sp>message" ) ; bulletinStatus . setTimestamp ( new java . util . Date ( 1464019245000L ) ) ; instanceStatus . setBulletinList ( java . util . Collections . singletonList ( bulletinStatus ) ) ; } else { instanceStatus . setBulletinList ( Collections . EMPTY_LIST ) ; } } if ( addStats ) { org . apache . nifi . minifi . commons . status . instance . InstanceStats instanceStats = new org . apache . nifi . minifi . commons . status . instance . InstanceStats ( ) ; instanceStats . setBytesRead ( 1L ) ; instanceStats . setBytesWritten ( 2L ) ; instanceStats . setBytesSent ( 3L ) ; instanceStats . setFlowfilesSent ( 4 ) ; instanceStats . setBytesTransferred ( 5L ) ; instanceStats . setFlowfilesTransferred ( 6 ) ; instanceStats . setBytesReceived ( 7L ) ; instanceStats . setFlowfilesReceived ( 8 ) ; instanceStatus . setInstanceStats ( instanceStats ) ; } flowStatusReport . setInstanceStatus ( instanceStatus ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testStream ( ) { java . util . List < com . vladmihalcea . book . hpjp . hibernate . fetching . PostgreSQLScrollableResultsStreamingTest . Post > posts = doInJPA ( ( entityManager ) -> { try ( Stream < com . vladmihalcea . book . hpjp . hibernate . fetching . Post > postStream = entityManager . createQuery ( ( "select<sp>p<sp>" + ( "from<sp>Post<sp>p<sp>" + "order<sp>by<sp>p.createdOn<sp>desc" ) ) , . class ) . setHint ( QueryHints . HINT_FETCH_SIZE , 50 ) . unwrap ( . class ) . stream ( ) ) { return postStream . limit ( 50 ) . collect ( java . util . stream . Collectors . toList ( ) ) ; } } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 50 , posts . size ( ) )
testSetTechnicalProductDistinguishedNameNull ( ) { container . login ( "1" , org . oscm . operatorservice . bean . ROLE_PLATFORM_OPERATOR ) ; callerRolles . add ( OrganizationRoleType . PLATFORM_OPERATOR ) ; dataManager_getReferenceByBusinessKey_return . push ( organization ) ; operatorService . setDistinguishedName ( "1" , null ) ; "<AssertPlaceHolder>" ; } getDistinguishedName ( ) { return distinguishedName ; }
org . junit . Assert . assertEquals ( null , organization . getDistinguishedName ( ) )
nullConstructor ( ) { "<AssertPlaceHolder>" ; } asDirectObject ( org . sejda . sambox . cos . COSObjectable ) { return new org . sejda . sambox . cos . DirectCOSObject ( java . util . Optional . ofNullable ( wrapped ) . orElse ( COSNull . NULL ) . getCOSObject ( ) ) ; }
org . junit . Assert . assertEquals ( COSNull . NULL , org . sejda . sambox . cos . DirectCOSObject . asDirectObject ( null ) . getCOSObject ( ) )
testSizeCanStoreLong ( ) { double confidence = 0.999 ; double epsilon = 1.0E-4 ; int seed = 1 ; com . clearspring . analytics . stream . frequency . CountMinSketch sketch = new com . clearspring . analytics . stream . frequency . CountMinSketch ( epsilon , confidence , seed ) ; long freq1 = Integer . MAX_VALUE ; long freq2 = 156 ; sketch . add ( 1 , freq1 ) ; sketch . add ( 2 , freq2 ) ; com . clearspring . analytics . stream . frequency . CountMinSketch newSketch = com . clearspring . analytics . stream . frequency . CountMinSketch . merge ( sketch , sketch ) ; long expectedSize = 2 * ( freq1 + freq2 ) ; "<AssertPlaceHolder>" ; } size ( ) { return counterMap . size ( ) ; }
org . junit . Assert . assertEquals ( expectedSize , newSketch . size ( ) )
testInsert ( ) { es . ieci . tecdoc . fwktd . sql . node . statement . insert . Insert insert = new es . ieci . tecdoc . fwktd . sql . node . statement . insert . Insert ( ) ; es . ieci . tecdoc . fwktd . sql . node . schema . Table table = new es . ieci . tecdoc . fwktd . sql . node . schema . Table ( ) ; table . setName ( "anyGivenTable" ) ; table . setSchemaName ( "anyGivenSchema" ) ; insert . setTable ( table ) ; java . util . List < es . ieci . tecdoc . fwktd . sql . node . schema . Column > columns = new java . util . ArrayList < es . ieci . tecdoc . fwktd . sql . node . schema . Column > ( ) ; columns . add ( new es . ieci . tecdoc . fwktd . sql . node . schema . Column ( table , "firstColumn" ) ) ; columns . add ( new es . ieci . tecdoc . fwktd . sql . node . schema . Column ( table , "secondColumn" ) ) ; insert . setColumns ( columns ) ; java . util . List < es . ieci . tecdoc . fwktd . sql . node . expression . IExpression > expressions = new java . util . ArrayList < es . ieci . tecdoc . fwktd . sql . node . expression . IExpression > ( ) ; expressions . add ( new es . ieci . tecdoc . fwktd . sql . node . expression . StringValue ( "'anyGivenValue'" ) ) ; expressions . add ( new es . ieci . tecdoc . fwktd . sql . node . expression . StringValue ( "'anotherValue'" ) ) ; insert . setValuesList ( new es . ieci . tecdoc . fwktd . sql . node . expression . operators . relational . ExpressionList ( expressions ) ) ; statementRenderer . visit ( insert ) ; "<AssertPlaceHolder>" ; } getSqlString ( ) { return sqlString ; }
org . junit . Assert . assertNotNull ( insert . getSqlString ( ) )
shouldReturnSameHashCodeForEqualButDifferentEntityMatchResults ( ) { edu . stanford . bmir . protege . web . shared . search . EntityNameMatchResult resultA = edu . stanford . bmir . protege . web . shared . search . EntityNameMatchResult . get ( 1 , 2 , EntityNameMatchType . SUB_STRING_MATCH , PrefixNameMatchType . NOT_IN_PREFIX_NAME ) ; edu . stanford . bmir . protege . web . shared . search . EntityNameMatchResult resultB = edu . stanford . bmir . protege . web . shared . search . EntityNameMatchResult . get ( 1 , 2 , EntityNameMatchType . SUB_STRING_MATCH , PrefixNameMatchType . NOT_IN_PREFIX_NAME ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return com . google . common . base . Objects . hashCode ( attributeName ) ; }
org . junit . Assert . assertEquals ( resultA . hashCode ( ) , resultB . hashCode ( ) )
testGetTotalHits ( ) { final int expResult = 5 ; final int result = errorPageCache . getTotalHits ( ) ; "<AssertPlaceHolder>" ; } getTotalHits ( ) { int hits = 0 ; for ( final com . adobe . acs . commons . errorpagehandler . cache . impl . CacheEntry entry : this . cache . values ( ) ) { hits = hits + ( entry . getHits ( ) ) ; } return hits ; }
org . junit . Assert . assertEquals ( expResult , result )
testFastSet ( ) { org . redisson . api . RListRx < java . lang . Integer > list = redisson . getList ( "list" ) ; sync ( list . add ( 1 ) ) ; sync ( list . add ( 2 ) ) ; sync ( list . fastSet ( 0 , 3 ) ) ; "<AssertPlaceHolder>" ; } sync ( org . redisson . api . RScoredSortedSetReactive ) { return org . redisson . BaseReactiveTest . toIterable ( list . iterator ( ) ) ; }
org . junit . Assert . assertEquals ( 3 , ( ( int ) ( sync ( list . get ( 0 ) ) ) ) )
testReplaceConnectionNameInJavaCode ( ) { java . lang . String testString = "\tSystem.out.println(\"=====\");\n\tout.a<sp>=<sp>b;\n\tout<sp>=<sp>obj1;\n\tout.a.out<sp>=<sp>obj2;\n\tout.out<sp>=<sp>obj3;\n\tout(obj1);\n\ta.out.b.out.c.out<sp>=<sp>1;\n\tout.a.out.b.out.c.out();\n" ; java . lang . String expectRetValue = "\tSystem.out.println(\"=====\");\n\trow1.a<sp>=<sp>b;\n\trow1<sp>=<sp>obj1;\n\trow1.a.out<sp>=<sp>obj2;\n\trow1.out<sp>=<sp>obj3;\n\tout(obj1);\n\ta.out.b.out.c.out<sp>=<sp>1;\n\trow1.a.out.b.out.c.out();\n" ; java . lang . String retValue = org . talend . core . model . utils . ParameterValueUtil . splitQueryData ( "out" , "row1" , testString ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof org . talend . repository . items . importexport . handlers . model . ImportItem ) ) { return false ; } org . talend . repository . items . importexport . handlers . model . ImportItem other = ( ( org . talend . repository . items . importexport . handlers . model . ImportItem ) ( obj ) ) ; if ( ( this . path ) == null ) { if ( ( other . path ) != null ) { return false ; } } else if ( ! ( this . path . equals ( other . path ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( expectRetValue . equals ( retValue ) )
testDestroyBusinessObjectData ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , DATA_VERSION ) ; java . util . List < org . finra . herd . model . dto . BusinessObjectDataDestroyDto > businessObjectDataDestroyDtoStates = java . util . Arrays . asList ( new org . finra . herd . model . dto . BusinessObjectDataDestroyDto ( businessObjectDataKey , STORAGE_NAME , org . finra . herd . model . jpa . BusinessObjectDataStatusEntity . DELETED , org . finra . herd . model . jpa . BusinessObjectDataStatusEntity . VALID , org . finra . herd . model . jpa . StorageUnitStatusEntity . DISABLING , org . finra . herd . model . jpa . StorageUnitStatusEntity . ENABLED , S3_ENDPOINT , S3_BUCKET_NAME , S3_KEY_PREFIX , S3_OBJECT_TAG_KEY , S3_OBJECT_TAG_VALUE , S3_OBJECT_TAGGER_ROLE_ARN , S3_OBJECT_TAGGER_ROLE_SESSION_NAME , BDATA_FINAL_DESTROY_DELAY_IN_DAYS ) , new org . finra . herd . model . dto . BusinessObjectDataDestroyDto ( businessObjectDataKey , STORAGE_NAME , org . finra . herd . model . jpa . BusinessObjectDataStatusEntity . DELETED , org . finra . herd . model . jpa . BusinessObjectDataStatusEntity . VALID , org . finra . herd . model . jpa . StorageUnitStatusEntity . DISABLED , org . finra . herd . model . jpa . StorageUnitStatusEntity . DISABLING , S3_ENDPOINT , S3_BUCKET_NAME , S3_KEY_PREFIX , S3_OBJECT_TAG_KEY , S3_OBJECT_TAG_VALUE , S3_OBJECT_TAGGER_ROLE_ARN , S3_OBJECT_TAGGER_ROLE_SESSION_NAME , BDATA_FINAL_DESTROY_DELAY_IN_DAYS ) ) ; org . finra . herd . model . api . xml . BusinessObjectData businessObjectData = new org . finra . herd . model . api . xml . BusinessObjectData ( ) ; businessObjectData . setId ( org . finra . herd . service . impl . ID ) ; doAnswer ( ( invocation ) -> { org . finra . herd . model . dto . BusinessObjectDataDestroyDto businessObjectDataDestroyDto = ( ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto ) ( invocation . getArguments ( ) [ 0 ] ) ) ; businessObjectDataDestroyDtoStates . get ( 0 ) . copyTo ( businessObjectDataDestroyDto ) ; return null ; } ) . when ( businessObjectDataInitiateDestroyHelperService ) . prepareToInitiateDestroy ( new org . finra . herd . model . dto . BusinessObjectDataDestroyDto ( ) , businessObjectDataKey ) ; doAnswer ( ( invocation ) -> { org . finra . herd . model . dto . BusinessObjectDataDestroyDto businessObjectDataDestroyDto = ( ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto ) ( invocation . getArguments ( ) [ 0 ] ) ) ; businessObjectDataDestroyDtoStates . get ( 1 ) . copyTo ( businessObjectDataDestroyDto ) ; return null ; } ) . when ( businessObjectDataInitiateDestroyHelperService ) . executeInitiateDestroyAfterStep ( any ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto . class ) ) ; when ( businessObjectDataInitiateDestroyHelperService . executeInitiateDestroyAfterStep ( any ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto . class ) ) ) . thenReturn ( businessObjectData ) ; org . finra . herd . model . api . xml . BusinessObjectData result = businessObjectDataServiceImpl . destroyBusinessObjectData ( businessObjectDataKey ) ; verify ( businessObjectDataInitiateDestroyHelperService ) . prepareToInitiateDestroy ( any ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto . class ) , any ( org . finra . herd . model . api . xml . BusinessObjectDataKey . class ) ) ; verify ( businessObjectDataInitiateDestroyHelperService ) . executeS3SpecificSteps ( any ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto . class ) ) ; verify ( businessObjectDataInitiateDestroyHelperService ) . executeInitiateDestroyAfterStep ( any ( org . finra . herd . model . dto . BusinessObjectDataDestroyDto . class ) ) ; verify ( notificationEventService , times ( 2 ) ) . processStorageUnitNotificationEventAsync ( any ( NotificationEventTypeEntity . EventTypesStorageUnit . class ) , any ( org . finra . herd . model . api . xml . BusinessObjectDataKey . class ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) ) ; verify ( notificationEventService ) . processBusinessObjectDataNotificationEventAsync ( any ( NotificationEventTypeEntity . EventTypesBdata . class ) , any ( org . finra . herd . model . api . xml . BusinessObjectDataKey . class ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( businessObjectData , result )
testNiFiPropertyRegistrationChangeInfo_Case_2 ( ) { com . thinkbiganalytics . nifi . rest . model . NifiProperty latestPropertyFromNifi = new com . thinkbiganalytics . nifi . rest . model . NifiProperty ( ) ; com . thinkbiganalytics . nifi . rest . model . NifiProperty registeredPropertyInKylo = new com . thinkbiganalytics . nifi . rest . model . NifiProperty ( ) ; latestPropertyFromNifi . setKey ( "var_a" ) ; latestPropertyFromNifi . setValue ( "two" ) ; registeredPropertyInKylo . setKey ( "var_a" ) ; registeredPropertyInKylo . setTemplateValue ( "one" ) ; registeredPropertyInKylo . setValue ( "one<sp>first" ) ; registeredPropertyInKylo . setUserEditable ( true ) ; registeredPropertyInKylo . setSelected ( true ) ; registeredPropertyInKylo . setRenderType ( "text" ) ; registeredPropertyInKylo . setSensitive ( false ) ; registeredPropertyInKylo . setRequired ( false ) ; NifiPropertyUtil . NiFiPropertyUpdater . updateSkipInput ( latestPropertyFromNifi , registeredPropertyInKylo ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "one<sp>first" , latestPropertyFromNifi . getValue ( ) )
shouldBeEqualOnSameElementWithDifferentPropertyWhenNoGroupBys ( ) { final uk . gov . gchq . gaffer . data . element . Entity testEntity1 = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY_3 ) . vertex ( "vertex" ) . property ( TestPropertyNames . SET , uk . gov . gchq . gaffer . commonutil . CollectionUtil . treeSet ( "3" ) ) . property ( TestPropertyNames . COUNT , 3L ) . build ( ) ; final uk . gov . gchq . gaffer . data . element . Entity testEntity2 = new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( TestGroups . ENTITY_3 ) . vertex ( "vertex" ) . property ( TestPropertyNames . SET , uk . gov . gchq . gaffer . commonutil . CollectionUtil . treeSet ( "3" ) ) . property ( TestPropertyNames . COUNT , 5L ) . build ( ) ; uk . gov . gchq . gaffer . data . element . comparison . ElementJoinComparator elementJoinComparator = new uk . gov . gchq . gaffer . data . element . comparison . ElementJoinComparator ( ) ; "<AssertPlaceHolder>" ; } test ( uk . gov . gchq . gaffer . data . element . Element , uk . gov . gchq . gaffer . data . element . Element ) { if ( element == element2 ) { return true ; } if ( ( null == element ) || ( null == element2 ) ) { return false ; } if ( ! ( element . getClass ( ) . equals ( element2 . getClass ( ) ) ) ) { return false ; } if ( ! ( element . getGroup ( ) . equals ( element2 . getGroup ( ) ) ) ) { return false ; } if ( element instanceof uk . gov . gchq . gaffer . data . element . Entity ) { if ( ! ( ( ( uk . gov . gchq . gaffer . data . element . Entity ) ( element ) ) . getVertex ( ) . equals ( ( ( uk . gov . gchq . gaffer . data . element . Entity ) ( element2 ) ) . getVertex ( ) ) ) ) { return false ; } } else { if ( ! ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element ) ) . getSource ( ) . equals ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element2 ) ) . getSource ( ) ) ) ) { return false ; } if ( ! ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element ) ) . getDestination ( ) . equals ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element2 ) ) . getDestination ( ) ) ) ) { return false ; } if ( ! ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element ) ) . getDirectedType ( ) . equals ( ( ( uk . gov . gchq . gaffer . data . element . Edge ) ( element2 ) ) . getDirectedType ( ) ) ) ) { return false ; } } for ( final java . lang . String key : groupByProperties ) { if ( ! ( java . util . Objects . equals ( element . getProperty ( key ) , element2 . getProperty ( key ) ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( elementJoinComparator . test ( testEntity1 , testEntity2 ) )
testGetValue ( ) { System . out . println ( "getValue" ) ; kg . apc . charting . elements . GraphPanelChartSimpleElement instance = new kg . apc . charting . elements . GraphPanelChartSimpleElement ( ) ; instance . add ( 1 ) ; instance . add ( 2 ) ; double expResult = 2.0 ; double result = instance . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return getPropertyAsString ( kg . apc . jmeter . modifiers . FifoPutPostProcessor . VALUE ) ; }
org . junit . Assert . assertEquals ( expResult , result , 0.0 )
shouldRejectTimeoutOverValue ( ) { lb . setTimeout ( 150 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( result . passedValidation ( ) )
testSubTypeOfObject ( ) { org . onosproject . net . resource . ContinuousResource continuous = org . onosproject . net . resource . Resources . continuous ( org . onosproject . net . resource . ContinuousResourceTest . D1 , org . onosproject . net . resource . ContinuousResourceTest . P1 , org . onlab . util . Bandwidth . class ) . resource ( org . onosproject . net . resource . ContinuousResourceTest . BW1 . bps ( ) ) ; "<AssertPlaceHolder>" ; } isSubTypeOf ( java . lang . Class ) { return components . stream ( ) . filter ( ( x ) -> ancestor . isAssignableFrom ( x . getClass ( ) ) ) . findAny ( ) . isPresent ( ) ; }
org . junit . Assert . assertThat ( continuous . isSubTypeOf ( java . lang . Object . class ) , org . hamcrest . Matchers . is ( true ) )
shouldReturnNull ( ) { io . sundr . it . Default item = new io . sundr . it . DefaultBuilder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } getMap ( ) { return this . map ; }
org . junit . Assert . assertNull ( item . getMap ( ) )
testIsBindableWhenTableIsAnExtendedEntryAndConstraintValueIsTypePredicate ( ) { doReturn ( BaseSingleFieldConstraint . TYPE_PREDICATE ) . when ( plugin ) . constraintValue ( ) ; doReturn ( GuidedDecisionTable52 . TableFormat . EXTENDED_ENTRY ) . when ( model ) . getTableFormat ( ) ; "<AssertPlaceHolder>" ; } isBindable ( ) { return ( ( ( tableFormat ( ) ) == ( LIMITED_ENTRY ) ) || ( ( constraintValue ( ) ) == ( org . drools . workbench . models . datamodel . rule . BaseSingleFieldConstraint . TYPE_LITERAL ) ) ) || ( ( constraintValue ( ) ) == ( org . drools . workbench . models . datamodel . rule . BaseSingleFieldConstraint . TYPE_RET_VALUE ) ) ; }
org . junit . Assert . assertFalse ( plugin . isBindable ( ) )
findAll ( ) { org . linagora . linshare . service . SharedSpaceNodeServiceImplTest . logger . info ( LinShareTestConstants . BEGIN_TEST ) ; java . util . List < org . linagora . linshare . mongo . entities . SharedSpaceNode > foundNodes = service . findAll ( root , root ) ; org . linagora . linshare . mongo . entities . SharedSpaceNode node = new org . linagora . linshare . mongo . entities . SharedSpaceNode ( "My<sp>first<sp>node" , "My<sp>parent<sp>nodeUuid" , org . linagora . linshare . core . domain . constants . NodeType . WORK_GROUP ) ; service . create ( authUser , authUser , node ) ; "<AssertPlaceHolder>" ; org . linagora . linshare . service . SharedSpaceNodeServiceImplTest . logger . info ( LinShareTestConstants . END_TEST ) ; } findAll ( org . linagora . linshare . core . domain . entities . Account , java . util . List ) { return uploadRequestGroupRepository . findAllByOwner ( owner , uploadRequestStatus ) ; }
org . junit . Assert . assertEquals ( ( ( foundNodes . size ( ) ) + 1 ) , service . findAll ( root , root ) . size ( ) )
testCreate ( ) { org . oscarehr . common . model . MeasurementGroup entity = new org . oscarehr . common . model . MeasurementGroup ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testToString ( ) { final java . lang . String wresult = testTokens . get ( "goodToken" ) ; final org . opensaml . saml1 . core . Assertion assertion = net . unicon . cas . support . wsfederation . WsFederationUtils . parseTokenFromString ( wresult ) ; final net . unicon . cas . support . wsfederation . authentication . principal . WsFederationCredential instance = net . unicon . cas . support . wsfederation . WsFederationUtils . createCredentialFromToken ( assertion ) ; final java . lang . String expResult = "<sp>Group:<sp>example.com\\Domain<sp>Users\n" 2 + ( ( ( ( ( ( ( ( ( ( ( "Issuer:<sp>http://adfs.example.com/adfs/services/trust\n" + "<sp>Group:<sp>example.com\\Domain<sp>Users\n" 3 ) + "Audience<sp>Method:<sp>urn:federation:authentication:windows\n" ) + "Issued<sp>On:<sp>2014-02-26T22:51:16.504Z\n" ) + "<sp>Group:<sp>example.com\\Domain<sp>Users\n" 1 ) + "Valid<sp>Before:<sp>2014-02-26T23:51:16.474Z\n" ) + "Attributes:\n" ) + "<sp>emailaddress:<sp>jgasper@example.com\n" ) + "<sp>upn:<sp>jgasper@example.com\n" ) + "<sp>givenname:<sp>John\n" ) + "<sp>Group:<sp>example.com\\Domain<sp>Users\n" 0 ) + "<sp>Group:<sp>example.com\\Domain<sp>Users\n" ) ; final java . lang . String result = instance . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . String attributeList = "" ; for ( final java . lang . String attr : this . attributes . keySet ( ) ) { attributeList += ( ( ( "<sp>" + attr ) + ":<sp>" ) + ( attributes . get ( attr ) ) ) + "\n" ; } final java . lang . String readable = "ID:<sp>%s\nIssuer:<sp>%s\nAudience:<sp>%s\nAudience<sp>Method:<sp>%s\nIssued<sp>On:<sp>%s\n" + "Valid<sp>After:<sp>%s\nValid<sp>Before:<sp>%s\nAttributes:\n%s" ; return java . lang . String . format ( readable , this . id , this . issuer , this . audience , this . authenticationMethod , this . issuedOn . toString ( ) , this . notBefore . toString ( ) , this . notOnOrAfter . toString ( ) , attributeList ) ; }
org . junit . Assert . assertEquals ( "<sp>Group:<sp>example.com\\Domain<sp>Users\n" 4 , expResult , result )
testOverwrite ( ) { buildRule . executeTarget ( "testoverwrite" ) ; java . io . File file2 = new java . io . File ( buildRule . getProject ( ) . getBaseDir ( ) , org . apache . tools . ant . taskdefs . ConcatTest . tempFile2 ) ; long size = file2 . length ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return line . length ( ) ; }
org . junit . Assert . assertTrue ( ( size > 0 ) )
testGetUsersByLogin ( ) { java . lang . String login1 = "uuser@ippon.fr" ; java . lang . String login2 = "jdubois@ippon.fr" ; java . util . Collection < java . lang . String > logins = new java . util . ArrayList < java . lang . String > ( ) ; logins . add ( login1 ) ; logins . add ( login2 ) ; mockAuthenticationOnUserService ( login2 ) ; java . util . Collection < fr . ippon . tatami . domain . User > users = userService . getUsersByLogin ( logins ) ; "<AssertPlaceHolder>" ; } getUsersByLogin ( java . util . Collection ) { final java . util . Collection < fr . ippon . tatami . domain . User > users = new java . util . ArrayList < fr . ippon . tatami . domain . User > ( ) ; fr . ippon . tatami . domain . User user ; for ( java . lang . String login : logins ) { user = userRepository . findUserByLogin ( login ) ; if ( user != null ) { users . add ( user ) ; } } return users ; }
org . junit . Assert . assertEquals ( 2 , users . size ( ) )
increaseNo ( ) { wsattacker . library . intelligentdos . helper . IterateModel iterateModel = wsattacker . library . intelligentdos . helper . IterateModel . custom ( ) . startAt ( 8 ) . stopAt ( 32 ) . setIncrement ( 2 ) . setIncreaseIncrementStrategie ( IncreaseIncrementStrategie . NO ) . build ( ) ; iterateModel . increaseIncrement ( ) ; iterateModel . increaseIncrement ( ) ; "<AssertPlaceHolder>" ; } getIncrement ( ) { return increment ; }
org . junit . Assert . assertThat ( iterateModel . getIncrement ( ) , org . hamcrest . Matchers . is ( 2 ) )
testClusters ( ) { javax . ws . rs . core . Response r = request ( oracle . kubernetes . operator . rest . RestTest . DOMAIN1_CLUSTERS_HREF ) . get ( ) ; verifyOK ( r ) ; oracle . kubernetes . operator . rest . model . CollectionModel < oracle . kubernetes . operator . rest . model . ClusterModel > want = new oracle . kubernetes . operator . rest . model . CollectionModel < oracle . kubernetes . operator . rest . model . ClusterModel > ( ) ; { oracle . kubernetes . operator . rest . model . ClusterModel item = createDomain1Cluster1 ( ) ; item . addSelfLinks ( oracle . kubernetes . operator . rest . RestTest . DOMAIN1_CLUSTER1_HREF ) ; want . addItem ( item ) ; } want . addSelfAndParentLinks ( oracle . kubernetes . operator . rest . RestTest . DOMAIN1_CLUSTERS_HREF , oracle . kubernetes . operator . rest . RestTest . DOMAIN1_HREF ) ; oracle . kubernetes . operator . rest . model . CollectionModel < oracle . kubernetes . operator . rest . model . ClusterModel > have = r . readEntity ( new javax . ws . rs . core . GenericType < oracle . kubernetes . operator . rest . model . CollectionModel < oracle . kubernetes . operator . rest . model . ClusterModel > > ( ) { } ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( "WlsMachineConfig{" + "name='" ) + ( name ) ) + '\'' ) + ",<sp>nodeManagerListenPort=" ) + ( nodeManagerListenPort ) ) + ",<sp>nodeManagerListenAddress='" ) + ( nodeManagerListenAddress ) ) + '\'' ) + ",<sp>nodeManagerType='" ) + ( nodeManagerType ) ) + '\'' ) + '}' ; }
org . junit . Assert . assertEquals ( have . toString ( ) , want . toString ( ) )
testNan ( ) { org . apache . commons . numbers . complex . Complex c = org . apache . commons . numbers . complex . Complex . ofCartesian ( Double . NaN , Double . NaN ) ; java . lang . String expected = "(NaN)<sp>+<sp>(NaN)i" ; java . lang . String actual = complexFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( org . apache . commons . math4 . geometry . Vector ) { return format ( vector , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testFlatAB ( ) { org . antlr . test . TreeAdaptor adaptor = new org . antlr . test . CommonTreeAdaptor ( ) ; org . antlr . test . TreeWizard wiz = new org . antlr . test . TreeWizard ( adaptor , org . antlr . test . TestTreeIterator . tokens ) ; org . antlr . test . CommonTree t = ( ( org . antlr . test . CommonTree ) ( wiz . create ( "(nil<sp>A<sp>B)" ) ) ) ; org . antlr . test . TreeIterator it = new org . antlr . test . TreeIterator ( t ) ; java . lang . StringBuffer buf = org . antlr . test . TestTreeIterator . toString ( it ) ; java . lang . String expecting = "nil<sp>DOWN<sp>A<sp>B<sp>UP<sp>EOF" ; java . lang . String found = buf . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return new java . lang . String ( data , start , length ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , found )
testFindCurrent ( ) { java . lang . String status1 = "ACTIVE" ; java . lang . String status2 = "NOTACTIVE" ; org . oscarehr . PMmodule . model . Vacancy vacancy1 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy1 ) ; vacancy1 . setStatus ( status1 ) ; dao . persist ( vacancy1 ) ; org . oscarehr . PMmodule . model . Vacancy vacancy2 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy2 ) ; vacancy2 . setStatus ( status2 ) ; dao . persist ( vacancy2 ) ; org . oscarehr . PMmodule . model . Vacancy vacancy3 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy3 ) ; vacancy3 . setStatus ( status1 ) ; dao . persist ( vacancy3 ) ; org . oscarehr . PMmodule . model . Vacancy vacancy4 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy4 ) ; vacancy2 . setStatus ( status2 ) ; dao . persist ( vacancy4 ) ; org . oscarehr . PMmodule . model . Vacancy vacancy5 = new org . oscarehr . PMmodule . model . Vacancy ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( vacancy5 ) ; vacancy5 . setStatus ( status1 ) ; dao . persist ( vacancy5 ) ; java . util . List < org . oscarehr . PMmodule . model . Vacancy > expectedResult = new java . util . ArrayList < org . oscarehr . PMmodule . model . Vacancy > ( java . util . Arrays . asList ( vacancy1 , vacancy3 , vacancy5 ) ) ; java . util . List < org . oscarehr . PMmodule . model . Vacancy > result = dao . findCurrent ( ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
testIncompleteData1 ( ) { java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( io . kubernetes . client . ExecTest . BAD_OUTPUT_INCOMPLETE_MSG1 . getBytes ( StandardCharsets . UTF_8 ) ) ; int exitCode = io . kubernetes . client . Exec . parseExitCode ( client , inputStream ) ; "<AssertPlaceHolder>" ; } parseExitCode ( io . kubernetes . client . ApiClient , java . io . InputStream ) { try { java . lang . reflect . Type returnType = new com . google . gson . reflect . TypeToken < io . kubernetes . client . models . V1Status > ( ) { } . getType ( ) ; java . lang . String body ; try ( final java . io . Reader reader = new java . io . InputStreamReader ( inputStream ) ) { body = com . google . common . io . CharStreams . toString ( reader ) ; } io . kubernetes . client . models . V1Status status = client . getJSON ( ) . deserialize ( body , returnType ) ; if ( status == null ) { return - 1 ; } if ( io . kubernetes . client . V1STATUS_SUCCESS . equals ( status . getStatus ( ) ) ) return 0 ; if ( io . kubernetes . client . V1STATUS_REASON_NONZEROEXITCODE . equals ( status . getReason ( ) ) ) { io . kubernetes . client . models . V1StatusDetails details = status . getDetails ( ) ; if ( details != null ) { java . util . List < io . kubernetes . client . models . V1StatusCause > causes = details . getCauses ( ) ; if ( causes != null ) { for ( io . kubernetes . client . models . V1StatusCause cause : causes ) { if ( io . kubernetes . client . V1STATUS_CAUSE_REASON_EXITCODE . equals ( cause . getReason ( ) ) ) { try { return java . lang . Integer . parseInt ( cause . getMessage ( ) ) ; } catch ( java . lang . NumberFormatException nfe ) { io . kubernetes . client . Exec . log . error ( "Error<sp>parsing<sp>exit<sp>code<sp>from<sp>status<sp>channel<sp>response" , nfe ) ; } } } } } } } catch ( java . lang . Throwable t ) { io . kubernetes . client . Exec . log . error ( "Error<sp>parsing<sp>exit<sp>code<sp>from<sp>status<sp>channel<sp>response" , t ) ; } return - 1 ; }
org . junit . Assert . assertEquals ( ( - 1 ) , exitCode )
testCreateGroupSupervisor ( ) { final org . bonitasoft . engine . identity . model . SGroup group = createSGroup ( "group1" ) ; final org . bonitasoft . engine . supervisor . mapping . model . SProcessSupervisor createdSupervisor = createGroupSupervisors ( java . util . Collections . singletonList ( group ) ) . get ( 0 ) ; final org . bonitasoft . engine . supervisor . mapping . model . SProcessSupervisor gotSupervisor = getSSupevisor ( createdSupervisor . getId ( ) ) ; "<AssertPlaceHolder>" ; deleteSupervisor ( createdSupervisor ) ; deleteSGroup ( group ) ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( createdSupervisor , gotSupervisor )
testFindNextElement_Forward_NotFound ( ) { java . lang . String searchString = "FindMex" ; provider . setParameter ( IFindReplaceProvider . PARAM_FORWARD , true ) ; provider . setParameter ( IFindReplaceProvider . PARAM_CASE_SENSITIVE , false ) ; provider . setParameter ( IFindReplaceProvider . PARAM_ALL_MODELS , true ) ; "<AssertPlaceHolder>" ; } findNextElement ( java . lang . Object , java . lang . String ) { java . util . List < com . archimatetool . model . INameable > elements = getAllNameableElements ( ) ; if ( elements . isEmpty ( ) ) { return null ; } int increment = ( isForward ( ) ) ? 1 : - 1 ; int startIndex = ( isForward ( ) ) ? 0 : ( elements . size ( ) ) - 1 ; if ( startElement != null ) { startIndex = ( elements . indexOf ( startElement ) ) + increment ; } for ( int i = startIndex ; isForward ( ) ? i < ( elements . size ( ) ) : i >= 0 ; i += increment ) { java . lang . Object element = elements . get ( i ) ; if ( matches ( element , toFind ) ) { return ( ( com . archimatetool . model . INameable ) ( element ) ) ; } } return null ; }
org . junit . Assert . assertNull ( provider . findNextElement ( null , searchString ) )
instantiation ( ) { org . junithelper . core . filter . impl . TrimInsideOfStringFilter target = new org . junithelper . core . filter . impl . TrimInsideOfStringFilter ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( target )
whenCheckingForEmptyHashSet_shouldCheckForEmpty ( ) { java . util . Set < java . lang . String > emptyHashSet = new java . util . HashSet ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( total ) == 0 ; }
org . junit . Assert . assertTrue ( emptyHashSet . isEmpty ( ) )
should_sort_with_english_locale ( ) { final java . util . List < java . lang . String > stringsToSort = asList ( "HD<sp>20GB" , "HD<sp>2GB" ) ; stringsToSort . sort ( new se . sawano . java . text . AlphanumericComparator ( java . util . Locale . ENGLISH ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( asList ( "HD<sp>2GB" , "HD<sp>20GB" ) , stringsToSort )
testEmpty ( ) { com . blade . Environment environment = com . blade . Environment . empty ( ) ; "<AssertPlaceHolder>" ; } toMap ( ) { lombok . var map = new com . blade . HashMap < java . lang . String , java . lang . String > ( props . size ( ) ) ; props . forEach ( ( k , v ) -> map . put ( k . toString ( ) , v . toString ( ) ) ) ; return map ; }
org . junit . Assert . assertEquals ( 0 , environment . toMap ( ) . size ( ) )
testAddString007 ( ) { java . util . LinkedList ll = new java . util . LinkedList ( ) ; ll . add ( new javax . naming . ldap . Rdn ( "t=test" ) ) ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( ll ) ; ln . add ( "t1=test1" ) ; ll . remove ( 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 2 , ln . size ( ) )
shouldBeAbleToInjectBaseContext ( ) { org . mockito . Mockito . when ( resourceProvider . lookup ( ( ( org . jboss . arquillian . test . api . ArquillianResource ) ( org . mockito . Mockito . any ( ) ) ) , org . mockito . Mockito . argThat ( new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricherTestCase . ClassInjectionAnnotationMatcher ( ) ) ) ) . thenReturn ( resource ) ; org . jboss . arquillian . test . spi . TestEnricher enricher = new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricher ( ) ; injector . get ( ) . inject ( enricher ) ; org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricherTestCase . ObjectClass test = new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricherTestCase . ObjectClass ( ) ; enricher . enrich ( test ) ; "<AssertPlaceHolder>" ; } enrich ( java . lang . Object ) { for ( java . lang . reflect . Field field : org . jboss . arquillian . test . impl . enricher . resource . SecurityActions . getFieldsWithAnnotation ( testCase . getClass ( ) , org . jboss . arquillian . test . api . ArquillianResource . class ) ) { java . lang . Object value = null ; try { java . util . List < java . lang . annotation . Annotation > qualifiers = filterAnnotations ( java . util . Arrays . asList ( field . getAnnotations ( ) ) ) ; checkPresentScopeInjection ( qualifiers , ResourceProvider . ClassInjection . class ) ; checkPresentScopeInjection ( qualifiers , ResourceProvider . MethodInjection . class ) ; org . jboss . arquillian . test . spi . enricher . resource . ResourceProvider . ClassInjection classInjectedResource = new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricher . SerializableClassInjection ( ) ; qualifiers . add ( classInjectedResource ) ; value = lookup ( field . getType ( ) , field . getAnnotation ( org . jboss . arquillian . test . api . ArquillianResource . class ) , qualifiers ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( "Could<sp>not<sp>lookup<sp>value<sp>for<sp>field<sp>" + field ) , e ) ; } try { if ( ! ( field . isAccessible ( ) ) ) { field . setAccessible ( true ) ; } field . set ( testCase , value ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( ( ( "Could<sp>not<sp>set<sp>value<sp>on<sp>field<sp>" + field ) + "<sp>using<sp>" ) + value ) , e ) ; } } }
org . junit . Assert . assertEquals ( resource , test . resource )
putMapKeyValue ( ) { org . apache . isis . schema . utils . CommonDtoUtils . putMapKeyValue ( null , "someKey" , "someValue" ) ; final org . apache . isis . schema . cmd . v1 . MapDto mapDto = new org . apache . isis . schema . cmd . v1 . MapDto ( ) ; org . apache . isis . schema . utils . CommonDtoUtils . putMapKeyValue ( mapDto , "someKey" , "someValue" ) ; "<AssertPlaceHolder>" ; } getMapValue ( org . apache . isis . schema . cmd . v1 . MapDto , java . lang . String ) { if ( mapDto == null ) { return null ; } final com . google . common . base . Optional < org . apache . isis . schema . cmd . v1 . MapDto . Entry > entryIfAny = org . apache . isis . schema . utils . CommonDtoUtils . entryIfAnyFor ( mapDto , key ) ; return entryIfAny . isPresent ( ) ? entryIfAny . get ( ) . getValue ( ) : null ; }
org . junit . Assert . assertThat ( org . apache . isis . schema . utils . CommonDtoUtils . getMapValue ( mapDto , "someKey" ) , org . hamcrest . CoreMatchers . is ( "someValue" ) )
manageOperations_VSERVERS_STOPPING_CombinedVServerStateNotNormal ( ) { paramHandler . getIaasContext ( ) . setVSystemStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . NORMAL ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageOperations ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , FlowState . VSERVERS_STOPPING ) ; "<AssertPlaceHolder>" ; } manageOperations ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; if ( ! vSysInNormalState ) { return null ; } org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_START_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STARTING , paramHandler ) ) { if ( vsysComm . startAllEFMs ( paramHandler ) ) { vsysComm . startAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STARTING ; } } break ; case VSERVERS_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . RUNNING ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSYSTEM_STOP_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { vsysComm . stopAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } break ; case VSERVERS_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testLimitNodeNameLength_AlreadyWithinLimit ( ) { java . lang . String nodeName = "within_limit" ; "<AssertPlaceHolder>" ; } limitNodeNameLength ( java . lang . String ) { if ( ( nodeName . length ( ) ) <= ( org . apache . crunch . impl . mr . plan . DotfileWriter . MAX_NODE_NAME_LENGTH ) ) { return nodeName ; } java . lang . String hashString = java . lang . Integer . toString ( nodeName . hashCode ( ) ) ; return java . lang . String . format ( "%s@%s" , org . apache . commons . lang . StringUtils . abbreviate ( nodeName , ( ( org . apache . crunch . impl . mr . plan . DotfileWriter . MAX_NODE_NAME_LENGTH ) - ( ( hashString . length ( ) ) + 1 ) ) ) , hashString ) ; }
org . junit . Assert . assertEquals ( nodeName , org . apache . crunch . impl . mr . plan . DotfileWriter . limitNodeNameLength ( nodeName ) )
testSCASubGenericsServiceDoIt ( ) { @ org . apache . tuscany . sca . itest . services . SuppressWarnings ( "unchecked" ) org . apache . tuscany . sca . itest . services . SubGenericsServiceClient < java . lang . String > subGenericsServiceClient = org . apache . tuscany . sca . itest . services . ServicesTestCase . node . getService ( org . apache . tuscany . sca . itest . services . SubGenericsServiceClient . class , "SubGenericsServiceClientSCAComponent" ) ; java . lang . String actual = "noting" ; java . lang . String expected = subGenericsServiceClient . doIt ( actual ) ; "<AssertPlaceHolder>" ; } doIt ( java . lang . String ) { return subGenericsService . doIt ( anything ) ; }
org . junit . Assert . assertEquals ( actual , expected )
shouldRejectWhenNodesIsNotEmpty ( ) { lb . getNodes ( ) . add ( new org . openstack . atlas . api . validation . validators . Node ( ) ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( result . passedValidation ( ) )