input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testRemove ( ) { com . liferay . knowledge . base . model . KBComment newKBComment = addKBComment ( ) ; _persistence . remove ( newKBComment ) ; com . liferay . knowledge . base . model . KBComment existingKBComment = _persistence . fetchByPrimaryKey ( newKBComment . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingKBComment )
returnLastSavedValueWhenColumNameIsTheSameSplitByColumn ( ) { when ( reader . currentValue ( ) ) . thenReturn ( new org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . SqlTableClassStub ( org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . COL_NAME_SAME_AS_SPLIT_BY , org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . ANY_VALUE_FOR_COL ) ) ; reader . getCurrentValue ( ) ; "<AssertPlaceHolder>" ; } getLastRecordValue ( ) { return lastRecordValue ; }
org . junit . Assert . assertEquals ( org . apache . sqoop . mapreduce . db . TestSQLServerDBRecordReader . ANY_VALUE_FOR_COL , reader . getLastRecordValue ( ) )
keySet_ToArray_withLargeTarget ( ) { com . gs . collections . api . map . MutableMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeysValues ( 1 , "One" , 2 , "Two" , 3 , "Three" , 4 , "Four" ) ; java . lang . Integer [ ] target = new java . lang . Integer [ 6 ] ; target [ 4 ] = 42 ; target [ 5 ] = 42 ; java . lang . Integer [ ] result = map . keySet ( ) . toArray ( target ) ; com . gs . collections . impl . utility . ArrayIterate . sort ( result , result . length , com . gs . collections . impl . block . factory . Comparators . safeNullsHigh ( Integer :: compareTo ) ) ; "<AssertPlaceHolder>" ; } safeNullsHigh ( java . util . Comparator ) { return new com . gs . collections . impl . block . factory . Comparators . SafeNullsHighComparator < T > ( notNullSafeComparator ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 42 , null } , result )
testBucketSortPipelineAggregation ( ) { com . liferay . portal . search . aggregation . pipeline . BucketSortPipelineAggregation bucketSortPipelineAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . bucketSort ( "name" ) ; "<AssertPlaceHolder>" ; } bucketSort ( java . lang . String ) { return new com . liferay . portal . search . internal . aggregation . pipeline . BucketSortPipelineAggregationImpl ( name ) ; }
org . junit . Assert . assertNotNull ( bucketSortPipelineAggregation )
testMallocAndFree ( ) { int pointer = m . malloc ( m_allocationSize ) ; m . free ( pointer ) ; "<AssertPlaceHolder>" ; } usedBlocks ( ) { return m_blocks . usedBlocks ( ) ; }
org . junit . Assert . assertEquals ( 0 , m . usedBlocks ( ) )
testGetParamTest ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "testKey" , "testVal" ) ; RequestParser < String > . ParsedRequest parsed = target . new org . o3project . odenos . remoteobject . ParsedRequest ( new org . o3project . odenos . remoteobject . message . Request ( "testID" , org . o3project . odenos . remoteobject . message . Request . Method . GET , "testPath" , "txid" , "testBody" ) , "testResult" , map , "testQuery" ) ; "<AssertPlaceHolder>" ; } getParam ( java . lang . String ) { return params . get ( key ) ; }
org . junit . Assert . assertThat ( parsed . getParam ( "testKey" ) , org . hamcrest . CoreMatchers . is ( "testVal" ) )
testQueueLimiting ( ) { org . apache . hadoop . test . GenericTestUtils . DelayAnswer delayer = new org . apache . hadoop . test . GenericTestUtils . DelayAnswer ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . LOG ) ; org . mockito . Mockito . doAnswer ( delayer ) . when ( mockProxy ) . journal ( org . mockito . Mockito . < org . apache . hadoop . hdfs . qjournal . protocol . RequestInfo > any ( ) , org . mockito . Mockito . eq ( 1L ) , org . mockito . Mockito . eq ( 1L ) , org . mockito . Mockito . eq ( 1 ) , org . mockito . Mockito . same ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . FAKE_DATA ) ) ; int numToQueue = ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . LIMIT_QUEUE_SIZE_BYTES ) / ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . FAKE_DATA . length ) ; for ( int i = 1 ; i <= numToQueue ; i ++ ) { ch . sendEdits ( 1L , ( ( long ) ( i ) ) , 1 , org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . FAKE_DATA ) ; } "<AssertPlaceHolder>" ; try { ch . sendEdits ( 1L , ( numToQueue + 1 ) , 1 , org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . FAKE_DATA ) . get ( 1 , TimeUnit . SECONDS ) ; org . junit . Assert . fail ( "Did<sp>not<sp>fail<sp>to<sp>queue<sp>more<sp>calls<sp>after<sp>queue<sp>was<sp>full" ) ; } catch ( java . util . concurrent . ExecutionException ee ) { if ( ! ( ( ee . getCause ( ) ) instanceof org . apache . hadoop . hdfs . qjournal . client . LoggerTooFarBehindException ) ) { throw ee ; } } delayer . proceed ( ) ; org . apache . hadoop . test . GenericTestUtils . waitFor ( new com . google . common . base . Supplier < java . lang . Boolean > ( ) { @ org . apache . hadoop . hdfs . qjournal . client . Override public org . apache . hadoop . hdfs . qjournal . client . Boolean get ( ) { return ( ch . getQueuedEditsSize ( ) ) == 0 ; } } , 10 , 1000 ) ; } getQueuedEditsSize ( ) { return ch . getQueuedEditsSize ( ) ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . hdfs . qjournal . client . TestIPCLoggerChannel . LIMIT_QUEUE_SIZE_BYTES , ch . getQueuedEditsSize ( ) )
shouldEscapeDollarSign ( ) { final java . lang . String glob = new java . lang . String ( "org$bar" ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . String , java . lang . String ) { return java . util . regex . Pattern . matches ( org . pitest . highwheel . util . GlobToRegex . convertGlobToRegex ( String ) , value ) ; }
org . junit . Assert . assertTrue ( matches ( glob , "org$bar" ) )
testEquals_equalsItself ( ) { org . eclipse . rap . rwt . template . Position position = new org . eclipse . rap . rwt . template . Position ( 3.14F , 42 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber other = ( ( org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber ) ( obj ) ) ; if ( ( requestor ) == null ) { if ( ( other . requestor ) != null ) return false ; } else if ( ! ( requestor . equals ( other . requestor ) ) ) return false ; if ( ( topic ) == null ) { if ( ( other . topic ) != null ) return false ; } else if ( ! ( topic . equals ( other . topic ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( position . equals ( position ) )
testDataStoreNameIsSet ( ) { doAnswer ( new org . mockito . stubbing . Answer ( ) { @ org . jbpm . workbench . pr . client . editors . variables . list . Override public org . jbpm . workbench . pr . client . editors . variables . list . Void answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) throws java . lang . Throwable { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { "<AssertPlaceHolder>" ; } return null ; } } ) . when ( currentListGrid ) . addColumns ( anyList ( ) ) ; view . initColumns ( currentListGrid ) ; verify ( currentListGrid ) . addColumns ( anyList ( ) ) ; } answer ( org . mockito . invocation . InvocationOnMock ) { final java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > columns = ( ( java . util . List < org . uberfire . ext . widgets . table . client . ColumnMeta > ) ( invocationOnMock . getArguments ( ) [ 0 ] ) ) ; for ( org . uberfire . ext . widgets . table . client . ColumnMeta columnMeta : columns ) { org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) ) ; } return null ; }
org . junit . Assert . assertNotNull ( columnMeta . getColumn ( ) . getDataStoreName ( ) )
testRevokeTablePermission ( ) { datawave . webservice . result . VoidResponse voidResponse = permissionsBean . revokeTablePermission ( "test" , "table" , "GRANT" ) ; "<AssertPlaceHolder>" ; } revokeTablePermission ( java . lang . String , java . lang . String , org . apache . accumulo . core . security . TablePermission ) { if ( ( acu . users . get ( principal ) ) == null ) throw new org . apache . accumulo . core . client . AccumuloSecurityException ( principal , org . apache . accumulo . core . client . impl . thrift . SecurityErrorCode . USER_DOESNT_EXIST ) ; datawave . accumulo . inmemory . InMemoryTable table = acu . tables . get ( tableName ) ; if ( table == null ) throw new org . apache . accumulo . core . client . AccumuloSecurityException ( tableName , org . apache . accumulo . core . client . impl . thrift . SecurityErrorCode . TABLE_DOESNT_EXIST ) ; java . util . EnumSet < org . apache . accumulo . core . security . TablePermission > perms = table . userPermissions . get ( principal ) ; if ( perms != null ) perms . remove ( permission ) ; }
org . junit . Assert . assertNotNull ( voidResponse )
testRemoveJobType_Null ( ) { final java . util . Map < java . lang . String , java . lang . Class < ? > > jobTypes = new java . util . HashMap < java . lang . String , java . lang . Class < ? > > ( ) ; jobTypes . put ( "TestRunnableJob" , net . greghaines . jesque . worker . TestMapBasedJobFactory . TestRunnableJob . class ) ; jobTypes . put ( "TestCallableJob" , net . greghaines . jesque . worker . TestMapBasedJobFactory . TestCallableJob . class ) ; final net . greghaines . jesque . worker . MapBasedJobFactory jobFactory = new net . greghaines . jesque . worker . MapBasedJobFactory ( jobTypes ) ; "<AssertPlaceHolder>" ; jobFactory . removeJobType ( null ) ; } getJobTypes ( ) { return java . util . Collections . unmodifiableMap ( this . jobTypes ) ; }
org . junit . Assert . assertEquals ( jobTypes , jobFactory . getJobTypes ( ) )
testRhinoScriptResolving ( ) { final java . lang . String scriptText = "file.owner.name" ; org . mozilla . javascript . ContextFactory contextFactory = org . mozilla . javascript . ContextFactory . getGlobal ( ) ; final java . lang . Object script = contextFactory . call ( new org . mozilla . javascript . ContextAction ( ) { public java . lang . Object run ( org . mozilla . javascript . Context context ) { try { return context . compileString ( scriptText , "script" , 1 , null ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; return null ; } } } ) ; java . lang . Object result = contextFactory . call ( new org . mozilla . javascript . ContextAction ( ) { public java . lang . Object run ( org . mozilla . javascript . Context context ) { org . mozilla . javascript . Scriptable scope = context . initStandardObjects ( ) ; java . io . StringWriter consoleData = new java . io . StringWriter ( ) ; java . io . PrintWriter console = new java . io . PrintWriter ( consoleData ) ; com . effektif . script . RhinoVariableScope rhinoVariableScope = new com . effektif . script . RhinoVariableScope ( null , null , console , scope ) ; rhinoVariableScope . objects . put ( "file" , new com . effektif . script . test . RhinoTest . MagicScriptableObject ( "file" ) ) ; java . lang . Object result = null ; try { org . mozilla . javascript . Script rhinoCompiledScript = ( ( org . mozilla . javascript . Script ) ( script ) ) ; result = rhinoCompiledScript . exec ( context , rhinoVariableScope ) ; } catch ( java . lang . Exception e ) { console . println ( ( "Exception<sp>while<sp>executing<sp>script:<sp>" + ( e . toString ( ) ) ) ) ; } return result ; } } ) ; "<AssertPlaceHolder>" ; } toString ( ) { return id ; }
org . junit . Assert . assertNotNull ( result )
whenParseDateTodayThenResultTimeStamp ( ) { java . sql . Timestamp date = pj . parseDate ( ",<sp>19:13" ) ; java . sql . Timestamp today = new java . sql . Timestamp ( java . lang . System . currentTimeMillis ( ) ) ; "<AssertPlaceHolder>" ; } getDate ( ) { return date ; }
org . junit . Assert . assertThat ( date . getDate ( ) , org . hamcrest . core . Is . is ( today . getDate ( ) ) )
testIsSymbolicLinkWithSymbolicLink ( ) { java . io . File source = prepareFile ( ) ; java . io . File target = tmpFolder . newFile ( "target" ) ; com . sap . prd . mobile . ios . mios . FileUtils . createSymbolicLink ( source , target ) ; "<AssertPlaceHolder>" ; } isSymbolicLink ( java . io . File ) { if ( ( file == null ) || ( ! ( file . exists ( ) ) ) ) return false ; java . io . PrintStream printStream = new java . io . PrintStream ( new java . io . ByteArrayOutputStream ( ) , true , java . nio . charset . Charset . defaultCharset ( ) . name ( ) ) ; try { int result = com . sap . prd . mobile . ios . mios . Forker . forkProcess ( printStream , file . getParentFile ( ) , "test" , "-L" , file . getName ( ) ) ; return result == 0 ; } finally { org . apache . commons . io . IOUtils . closeQuietly ( printStream ) ; } }
org . junit . Assert . assertTrue ( com . sap . prd . mobile . ios . mios . FileUtils . isSymbolicLink ( target ) )
testGetDeliverer_nonExistent ( ) { org . kuali . rice . kcb . bo . MessageDelivery mockInvalid = new org . kuali . rice . kcb . bo . MessageDelivery ( ) ; mockInvalid . setDelivererTypeName ( TestConstants . NON_EXISTENT_DELIVERER_NAME ) ; boolean caughtException = false ; org . kuali . rice . kcb . deliverer . MessageDeliverer deliverer = services . getMessageDelivererRegistryService ( ) . getDeliverer ( mockInvalid ) ; "<AssertPlaceHolder>" ; } getDeliverer ( org . kuali . rice . kcb . bo . MessageDelivery ) { if ( messageDelivery == null ) { throw new org . kuali . rice . core . api . exception . RiceIllegalArgumentException ( "messageDelivery<sp>is<sp>null" ) ; } org . kuali . rice . kcb . deliverer . MessageDeliverer nmd = getDelivererByName ( messageDelivery . getDelivererTypeName ( ) ) ; if ( nmd == null ) { org . kuali . rice . kcb . service . impl . MessageDelivererRegistryServiceImpl . LOG . error ( ( ( ( ( ( ( "The<sp>message<sp>deliverer<sp>type<sp>('" + ( messageDelivery . getDelivererTypeName ( ) ) ) + "')<sp>" ) + "associated<sp>with<sp>message<sp>delivery<sp>id='" ) + ( messageDelivery . getId ( ) ) ) + "'<sp>was<sp>not<sp>found<sp>in<sp>the<sp>message<sp>deliverer<sp>registry.<sp>This<sp>deliverer<sp>" ) + "plugin<sp>is<sp>not<sp>in<sp>the<sp>system." ) ) ; } return nmd ; }
org . junit . Assert . assertNull ( deliverer )
testGetStreamArn ( ) { when ( mockRequest . getStreamName ( ) ) . thenReturn ( TEST_STRING ) ; java . lang . String actual = adapter . getStreamArn ( ) ; "<AssertPlaceHolder>" ; } getStreamArn ( ) { return internalRequest . getStreamName ( ) ; }
org . junit . Assert . assertEquals ( TEST_STRING , actual )
testParseNull ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( s == null ) { return null ; } java . lang . String [ ] part = s . split ( ":" ) ; if ( ( part [ 0 ] . contains ( "POTION" ) ) || ( part [ 0 ] . equalsIgnoreCase ( "TIPPED_ARROW" ) ) ) { return world . bentobox . bentobox . util . ItemParser . potion ( part ) ; } else if ( part [ 0 ] . contains ( "BANNER" ) ) { return world . bentobox . bentobox . util . ItemParser . banner ( part ) ; } if ( ( part . length ) == 2 ) { return world . bentobox . bentobox . util . ItemParser . two ( part ) ; } else if ( ( part . length ) == 3 ) { return world . bentobox . bentobox . util . ItemParser . three ( part ) ; } return null ; }
org . junit . Assert . assertNull ( world . bentobox . bentobox . util . ItemParser . parse ( null ) )
Create3G_test15 ( ) { com . att . aro . core . configuration . pojo . Profile3G profile3g = mock ( com . att . aro . core . configuration . pojo . Profile3G . class ) ; when ( profile3g . getProfileType ( ) ) . thenReturn ( ProfileType . T3G ) ; when ( profile3g . getIdleDchPromoAvg ( ) ) . thenReturn ( 12000.0 ) ; when ( profile3g . getIdleDchPromoMin ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getIdleDchPromoMax ( ) ) . thenReturn ( 20000.0 ) ; when ( profile3g . getFachDchPromoAvg ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getFachDchPromoMin ( ) ) . thenReturn ( 2500.0 ) ; when ( profile3g . getFachDchPromoMax ( ) ) . thenReturn ( 6000.0 ) ; when ( profile3g . getDchFachTimer ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getFachIdleTimer ( ) ) . thenReturn ( 2000.0 ) ; double traceDuration = 2000.0 ; java . util . List < com . att . aro . core . packetanalysis . pojo . PacketInfo > packetlist = new java . util . ArrayList < com . att . aro . core . packetanalysis . pojo . PacketInfo > ( ) ; when ( pktInfoArray [ 0 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) - 1500.0 ) ) ; when ( pktInfoArray [ 0 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 0 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 0 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_FACH ) ; packetlist . add ( pktInfoArray [ 0 ] ) ; when ( pktInfoArray [ 1 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 1000.0 ) ) ; when ( pktInfoArray [ 1 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 1 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 1 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_FACH ) ; packetlist . add ( pktInfoArray [ 1 ] ) ; when ( pktInfoArray [ 2 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 1500.0 ) ) ; when ( pktInfoArray [ 2 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 2 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 2 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_FACH ) ; packetlist . add ( pktInfoArray [ 2 ] ) ; java . util . List < com . att . aro . core . packetanalysis . pojo . RrcStateRange > testList = rrcStateRangeFactory . create ( packetlist , profile3g , traceDuration ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , testList . size ( ) )
testIsAsyncEventQueueUsingDiskStore ( ) { final java . lang . String diskStoreName = "testDiskStore" ; final com . gemstone . gemfire . cache . asyncqueue . AsyncEventQueue mockQueue = mockContext . mock ( com . gemstone . gemfire . cache . asyncqueue . AsyncEventQueue . class , "AsyncEventQueue" ) ; final com . gemstone . gemfire . cache . DiskStore mockDiskStore = mockContext . mock ( com . gemstone . gemfire . cache . DiskStore . class , "DiskStore" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockQueue ) . getDiskStoreName ( ) ; will ( returnValue ( diskStoreName ) ) ; oneOf ( mockQueue ) . isPersistent ( ) ; will ( returnValue ( true ) ) ; oneOf ( mockDiskStore ) . getName ( ) ; will ( returnValue ( diskStoreName ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . functions . DescribeDiskStoreFunction function = createDescribeDiskStoreFunction ( null ) ; "<AssertPlaceHolder>" ; } isUsingDiskStore ( com . gemstone . gemfire . cache . Region , com . gemstone . gemfire . cache . DiskStore ) { return ( ( isPersistent ( region ) ) || ( isOverflowToDisk ( region ) ) ) && ( com . gemstone . gemfire . internal . lang . ObjectUtils . equals ( getDiskStoreName ( region ) , diskStore . getName ( ) ) ) ; }
org . junit . Assert . assertTrue ( function . isUsingDiskStore ( mockQueue , mockDiskStore ) )
testSetPolicyAtTestPath ( ) { javax . jcr . security . AccessControlPolicyIterator it = acMgr . getApplicablePolicies ( org . apache . jackrabbit . oak . security . authorization . composite . CompositeAccessControlManagerTest . TEST_PATH ) ; int cnt = 0 ; while ( it . hasNext ( ) ) { javax . jcr . security . AccessControlPolicy plc = it . nextAccessControlPolicy ( ) ; acMgr . setPolicy ( org . apache . jackrabbit . oak . security . authorization . composite . CompositeAccessControlManagerTest . TEST_PATH , plc ) ; cnt ++ ; } "<AssertPlaceHolder>" ; } setPolicy ( java . lang . String , javax . jcr . security . AccessControlPolicy ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 2 , cnt )
testContextLoading ( ) { org . springframework . context . ApplicationContext context = new org . springframework . context . support . ClassPathXmlApplicationContext ( "classpath:spring-test-async-server.xml" ) ; org . jboss . resteasy . core . AsynchronousDispatcher dispatcher = ( ( org . jboss . resteasy . core . AsynchronousDispatcher ) ( context . getBean ( "resteasy.dispatcher" ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( dispatcher )
testPost ( ) { java . lang . String s = org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyServerAsyncTest . proxy . post ( "a" ) ; "<AssertPlaceHolder>" ; } post ( java . lang . String ) { return org . jboss . resteasy . test . rx . rxjava2 . resource . Rx2ObservableResourceNoStreamImpl . buildObservableString ( s , 3 ) ; }
org . junit . Assert . assertEquals ( "a" , s )
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS20 icms20 = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS20 ( ) ; icms20 . setModalidadeBCICMS ( NFNotaInfoItemModalidadeBCICMS . PAUTA ) ; icms20 . setOrigem ( NFOrigem . NACIONAL ) ; icms20 . setPercentualAliquota ( new java . math . BigDecimal ( "99.99" ) ) ; icms20 . setPercentualReducaoBC ( new java . math . BigDecimal ( "99.99" ) ) ; icms20 . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . ISENTA ) ; icms20 . setValorBCICMS ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms20 . setValorTributo ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms20 . setDesoneracao ( NFNotaMotivoDesoneracaoICMS . OUTROS ) ; icms20 . setValorICMSDesoneracao ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms20 . setValorBCFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icms20 . setPercentualFundoCombatePobreza ( new java . math . BigDecimal ( "99.99" ) ) ; icms20 . setValorFundoCombatePobreza ( new java . math . BigDecimal ( "999999999999.99" ) ) ; final java . lang . String xmlEsperado = "<NFNotaInfoItemImpostoICMS20><orig>0</orig><CST>40</CST><modBC>1</modBC><pRedBC>99.99</pRedBC><vBC>999999999999.99</vBC><pICMS>99.99</pICMS><vICMS>999999999999.99</vICMS><vBCFCP>999999999999.99</vBCFCP><pFCP>99.99</pFCP><vFCP>999999999999.99</vFCP><vICMSDeson>999999999999.99</vICMSDeson><motDesICMS>9</motDesICMS></NFNotaInfoItemImpostoICMS20>" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getDescricao ( ) ; }
org . junit . Assert . assertEquals ( xmlEsperado , icms20 . toString ( ) )
testRenameCommand ( ) { final org . kie . workbench . common . widgets . metadata . client . TestDocument document = createTestDocument ( ) ; final org . uberfire . backend . vfs . ObservablePath path = document . getLatestPath ( ) ; registerDocument ( document ) ; final org . mockito . ArgumentCaptor < org . uberfire . mvp . Command > renameCommandCaptor = org . mockito . ArgumentCaptor . forClass ( org . uberfire . mvp . Command . class ) ; verify ( path , times ( 1 ) ) . onRename ( renameCommandCaptor . capture ( ) ) ; final org . uberfire . mvp . Command renameCommand = renameCommandCaptor . getValue ( ) ; "<AssertPlaceHolder>" ; renameCommand . execute ( ) ; verify ( editorView , times ( 2 ) ) . refreshTitle ( any ( java . lang . String . class ) ) ; verify ( editorView , times ( 1 ) ) . showBusyIndicator ( any ( java . lang . String . class ) ) ; verify ( editor , times ( 2 ) ) . getDocumentTitle ( eq ( document ) ) ; verify ( editor , times ( 1 ) ) . refreshDocument ( eq ( document ) ) ; verify ( changeTitleEvent , times ( 1 ) ) . fire ( any ( org . uberfire . client . workbench . events . ChangeTitleWidgetEvent . class ) ) ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertNotNull ( renameCommand )
testLinear ( ) { mikera . vectorz . Op op = Ops . LINEAR ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( op )
findJobTracker_EntryNameNotFound ( ) { org . pentaho . di . core . gui . JobTracker jobTracker = org . pentaho . di . core . gui . JobTrackerTest . createTracker ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { jobTracker . addJobTracker ( org . pentaho . di . core . gui . JobTrackerTest . createTracker ( java . lang . Integer . toString ( i ) , 1 ) ) ; } org . pentaho . di . job . entry . JobEntryCopy copy = org . pentaho . di . core . gui . JobTrackerTest . createEntryCopy ( "not<sp>match" ) ; "<AssertPlaceHolder>" ; } findJobTracker ( org . pentaho . di . job . entry . JobEntryCopy ) { if ( ( jobEntryCopy . getName ( ) ) == null ) { return null ; } lock . readLock ( ) . lock ( ) ; try { java . util . ListIterator < org . pentaho . di . core . gui . JobTracker > it = jobTrackers . listIterator ( jobTrackers . size ( ) ) ; while ( it . hasPrevious ( ) ) { org . pentaho . di . core . gui . JobTracker tracker = it . previous ( ) ; org . pentaho . di . job . JobEntryResult result = tracker . getJobEntryResult ( ) ; if ( result != null ) { if ( ( jobEntryCopy . getName ( ) . equals ( result . getJobEntryName ( ) ) ) && ( ( jobEntryCopy . getNr ( ) ) == ( result . getJobEntryNr ( ) ) ) ) { return tracker ; } } } } finally { lock . readLock ( ) . unlock ( ) ; } return null ; }
org . junit . Assert . assertNull ( jobTracker . findJobTracker ( copy ) )
testLoad ( ) { java . util . List < io . yawp . driver . postgresql . configuration . XmlLoader > envs = loadFromXml ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return order . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , envs . size ( ) )
testLast ( ) { "<AssertPlaceHolder>" ; } last ( ) { final org . drools . verifier . core . index . select . Select < T > . Entry < T > entry = lastEntry ( ) ; if ( entry == null ) { return null ; } else { return entry . getValue ( ) ; } }
org . junit . Assert . assertNull ( select . last ( ) )
testGetCheckedoutDocs ( ) { org . pentaho . platform . util . client . BiPlatformRepositoryClientNavigationServiceTest . mLog . info ( "testGetCheckedoutDocs.." ) ; try { navService . getCheckedoutDocs ( BiPlatformRepositoryClient . PLATFORMORIG , "/admin/sales_data.csv" , "filter" , false , false , 3 , 0 ) ; } catch ( java . lang . Exception exe ) { "<AssertPlaceHolder>" ; } } getCheckedoutDocs ( java . lang . String , java . lang . String , java . lang . String , boolean , boolean , int , int ) { throw new org . pentaho . commons . util . repository . exception . OperationNotSupportedException ( ) ; }
org . junit . Assert . assertTrue ( ( exe instanceof org . pentaho . commons . util . repository . exception . OperationNotSupportedException ) )
testNewStager_yaml ( ) { org . mockito . Mockito . when ( stageMojo . isAppEngineCompatiblePackaging ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( stageMojo . isAppEngineWebXmlBased ( ) ) . thenReturn ( false ) ; org . mockito . Mockito . when ( stageMojo . getArtifact ( ) ) . thenReturn ( tempFolder . getRoot ( ) . toPath ( ) ) ; com . google . cloud . tools . maven . stage . Stager stager = com . google . cloud . tools . maven . stage . Stager . newStager ( stageMojo ) ; "<AssertPlaceHolder>" ; } newStager ( com . google . cloud . tools . maven . stage . AbstractStageMojo ) { if ( ! ( stageMojo . isAppEngineCompatiblePackaging ( ) ) ) { return new com . google . cloud . tools . maven . stage . NoOpStager ( ) ; } if ( ( ( stageMojo . getArtifact ( ) ) == null ) || ( ! ( java . nio . file . Files . exists ( stageMojo . getArtifact ( ) ) ) ) ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "\nCould<sp>not<sp>determine<sp>appengine<sp>environment,<sp>did<sp>you<sp>package<sp>your<sp>application?" + "\nRun<sp>\'mvn<sp>package<sp>appengine:stage\'" ) ) ; } return stageMojo . isAppEngineWebXmlBased ( ) ? com . google . cloud . tools . maven . stage . AppEngineWebXmlStager . newAppEngineWebXmlStager ( stageMojo ) : com . google . cloud . tools . maven . stage . AppYamlStager . newAppYamlStager ( stageMojo ) ; }
org . junit . Assert . assertEquals ( com . google . cloud . tools . maven . stage . AppYamlStager . class , stager . getClass ( ) )
testUnassignedWildcardFragmentRuleCall ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "Rule:<sp>Called;" ) ; _builder . newLine ( ) ; _builder . append ( "fragment<sp>Called*:<sp>name=ID;" ) ; _builder . newLine ( ) ; final java . lang . String actual = this . toPda ( _builder ) ; org . eclipse . xtend2 . lib . StringConcatenation _builder_1 = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder_1 . append ( "Rule:" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "start<sp>-><sp>>>Called" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "<<Called<sp>-><sp>stop" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( ">>Called<sp>-><sp>name=ID" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "name=ID<sp>-><sp><<Called" ) ; _builder_1 . newLine ( ) ; final java . lang . String expected = _builder_1 . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . google . common . base . Joiner . on ( "\n" ) . join ( getList ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testCreateStorageUnitNotificationRegistration ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationCreateRequest request = new org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationCreateRequest ( notificationRegistrationKey , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , new org . finra . herd . model . api . xml . StorageUnitNotificationFilter ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , STORAGE_NAME , STORAGE_UNIT_STATUS , STORAGE_UNIT_STATUS_2 ) , notificationRegistrationDaoTestHelper . getTestJobActions ( ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistration storageUnitNotificationRegistration = new org . finra . herd . model . api . xml . StorageUnitNotificationRegistration ( ID , notificationRegistrationKey , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , new org . finra . herd . model . api . xml . StorageUnitNotificationFilter ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , STORAGE_NAME , STORAGE_UNIT_STATUS , STORAGE_UNIT_STATUS_2 ) , notificationRegistrationDaoTestHelper . getTestJobActions ( ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) ; when ( storageUnitNotificationRegistrationService . createStorageUnitNotificationRegistration ( request ) ) . thenReturn ( storageUnitNotificationRegistration ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistration resultStorageUnitNotificationRegistration = storageUnitNotificationRegistrationRestController . createStorageUnitNotificationRegistration ( request ) ; verify ( storageUnitNotificationRegistrationService ) . createStorageUnitNotificationRegistration ( request ) ; verifyNoMoreInteractions ( storageUnitNotificationRegistrationService ) ; "<AssertPlaceHolder>" ; } createStorageUnitNotificationRegistration ( org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationCreateRequest ) { validateStorageUnitNotificationRegistrationCreateRequest ( request ) ; org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = request . getStorageUnitNotificationRegistrationKey ( ) ; org . finra . herd . model . jpa . NamespaceEntity namespaceEntity = namespaceDaoHelper . getNamespaceEntity ( notificationRegistrationKey . getNamespace ( ) ) ; org . finra . herd . model . jpa . NotificationEventTypeEntity notificationEventTypeEntity = getAndValidateNotificationEventTypeEntity ( request . getStorageUnitEventType ( ) ) ; org . springframework . util . Assert . isTrue ( NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) . equalsIgnoreCase ( request . getStorageUnitEventType ( ) ) , java . lang . String . format ( "Notification<sp>event<sp>type<sp>\"%s\"<sp>is<sp>not<sp>supported<sp>for<sp>storage<sp>unit<sp>notification<sp>registration." , request . getStorageUnitEventType ( ) ) ) ; org . finra . herd . model . api . xml . StorageUnitNotificationFilter filter = request . getStorageUnitNotificationFilter ( ) ; org . finra . herd . model . jpa . BusinessObjectDefinitionEntity businessObjectDefinitionEntity = businessObjectDefinitionDaoHelper . getBusinessObjectDefinitionEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( filter . getNamespace ( ) , filter . getBusinessObjectDefinitionName ( ) ) ) ; org . finra . herd . model . jpa . FileTypeEntity fileTypeEntity = null ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( filter . getBusinessObjectFormatFileType ( ) ) ) { fileTypeEntity = fileTypeDaoHelper . getFileTypeEntity ( filter . getBusinessObjectFormatFileType ( ) ) ; } org . finra . herd . model . jpa . StorageEntity storageEntity = storageDaoHelper . getStorageEntity ( filter . getStorageName ( ) ) ; org . finra . herd . model . jpa . StorageUnitStatusEntity newStorageUnitStatus = null ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( filter . getNewStorageUnitStatus ( ) ) ) { newStorageUnitStatus = storageUnitStatusDaoHelper . getStorageUnitStatusEntity ( filter . getNewStorageUnitStatus ( ) ) ; } org . finra . herd . model . jpa . StorageUnitStatusEntity oldStorageUnitStatus = null ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( filter . getOldStorageUnitStatus ( ) ) ) { oldStorageUnitStatus = storageUnitStatusDaoHelper . getStorageUnitStatusEntity ( filter . getOldStorageUnitStatus ( ) ) ; } for ( org . finra . herd . model . api . xml . JobAction jobAction : request . getJobActions ( ) ) { jobDefinitionDaoHelper . getJobDefinitionEntity ( jobAction . getNamespace ( ) , jobAction . getJobName ( ) ) ; } org . finra . herd . model . jpa . NotificationRegistrationStatusEntity notificationRegistrationStatusEntity = notificationRegistrationStatusDaoHelper . getNotificationRegistrationStatusEntity ( ( org . apache . commons . lang3 . StringUtils . isNotBlank ( request . getNotificationRegistrationStatus ( ) ) ? request . getNotificationRegistrationStatus ( ) : org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) ) ; org . finra . herd . model . jpa . StorageUnitNotificationRegistrationEntity storageUnitNotificationRegistrationEntity = storageUnitNotificationRegistrationDao . getStorageUnitNotificationRegistrationByAltKey ( notificationRegistrationKey ) ; if ( storageUnitNotificationRegistrationEntity != null ) { throw new org . finra . herd . model . AlreadyExistsException ( java . lang . String . format ( "Unable<sp>to<sp>create<sp>storage<sp>unit<sp>notification<sp>with<sp>name<sp>\"%s\"<sp>because<sp>it<sp>already<sp>exists<sp>for<sp>namespace<sp>\"%s\"." , notificationRegistrationKey . getNotificationName ( ) , notificationRegistrationKey . getNamespace ( ) ) ) ; } storageUnitNotificationRegistrationEntity = createStorageUnitNotificationEntity ( namespaceEntity , notificationEventTypeEntity , businessObjectDefinitionEntity , fileTypeEntity , storageEntity , newStorageUnitStatus , oldStorageUnitStatus , request . getStorageUnitNotificationRegistrationKey ( ) , request . getStorageUnitNotificationFilter ( ) , request . getJobActions ( ) , notificationRegistrationStatusEntity ) ; storageUnitNotificationRegistrationEntity = storageUnitNotificationRegistrationDao . saveAndRefresh ( storageUnitNotificationRegistrationEntity ) ; return createStorageUnitNotificationFromEntity ( storageUnitNotificationRegistrationEntity ) ; }
org . junit . Assert . assertEquals ( storageUnitNotificationRegistration , resultStorageUnitNotificationRegistration )
testAddMultipleFragmentEntries ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com . liferay . fragment . model . FragmentCollection fragmentCollection = com . liferay . fragment . service . FragmentCollectionServiceUtil . addFragmentCollection ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , StringPool . BLANK , serviceContext ) ; java . util . List < com . liferay . fragment . model . FragmentEntry > originalFragmentEntries = com . liferay . fragment . service . FragmentEntryServiceUtil . getFragmentEntries ( fragmentCollection . getFragmentCollectionId ( ) ) ; com . liferay . fragment . service . FragmentEntryServiceUtil . addFragmentEntry ( _group . getGroupId ( ) , fragmentCollection . getFragmentCollectionId ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , WorkflowConstants . STATUS_APPROVED , serviceContext ) ; com . liferay . fragment . service . FragmentEntryServiceUtil . addFragmentEntry ( _group . getGroupId ( ) , fragmentCollection . getFragmentCollectionId ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , WorkflowConstants . STATUS_APPROVED , serviceContext ) ; java . util . List < com . liferay . fragment . model . FragmentEntry > actualFragmentEntries = com . liferay . fragment . service . FragmentEntryServiceUtil . getFragmentEntries ( fragmentCollection . getFragmentCollectionId ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( actualFragmentEntries . toString ( ) , ( ( originalFragmentEntries . size ( ) ) + 2 ) , actualFragmentEntries . size ( ) )
testNotNull ( ) { final joinery . DataFrame < java . lang . Boolean > nonnulls = df . notnull ( ) ; final java . lang . Object [ ] expected = new java . lang . Boolean [ ] { true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , true , false , false , false , false , false , false } ; "<AssertPlaceHolder>" ; } toArray ( ) { return toArray ( new java . lang . Object [ ( size ( ) ) * ( length ( ) ) ] ) ; }
org . junit . Assert . assertArrayEquals ( expected , nonnulls . toArray ( ) )
test_GetCustomByClassName_By_Name ( ) { mmarquee . automation . BaseAutomationTest . setElementClassName ( elem , "BlaBla" ) ; mmarquee . automation . BaseAutomationTest . setElementCurrentName ( elem , "myName" ) ; when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationCustom bar = spyWndw . getCustom ( mmarquee . automation . controls . Search . getBuilder ( "myName" ) . className ( "BlaBla" ) . build ( ) ) ; "<AssertPlaceHolder>" ; verify ( spyWndw ) . createNamePropertyCondition ( "myName" ) ; verify ( spyWndw ) . createClassNamePropertyCondition ( "BlaBla" ) ; verify ( spyWndw ) . createControlTypeCondition ( ControlType . Custom ) ; verify ( element , atLeastOnce ( ) ) . findFirst ( any ( ) , any ( ) ) ; } getElement ( ) { return this . element ; }
org . junit . Assert . assertEquals ( targetElement , bar . getElement ( ) )
testModelDefinition ( ) { final java . util . Optional < org . kie . workbench . common . dmn . api . definition . v1_1 . Invocation > oModel = definition . getModelClass ( ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return isPresent ; }
org . junit . Assert . assertTrue ( oModel . isPresent ( ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Layout > layouts = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( layouts . isEmpty ( ) )
shouldCallConsumerProvidingTheDescriptionWhenThresholdIsTrue ( ) { java . lang . String description = "description" ; org . neo4j . kernel . impl . transaction . log . checkpoint . AbstractCheckPointThreshold threshold = new org . neo4j . kernel . impl . transaction . log . checkpoint . AbstractCheckPointThresholdTest . TheAbstractCheckPointThreshold ( true , description ) ; final java . util . concurrent . atomic . AtomicReference < java . lang . String > calledWith = new java . util . concurrent . atomic . AtomicReference ( ) ; threshold . isCheckPointingNeeded ( 42 , calledWith :: set ) ; "<AssertPlaceHolder>" ; } get ( ) { org . neo4j . kernel . recovery . LogTailScanner . LogTailInformation logTailInformation = logTailScanner . getTailInformation ( ) ; org . neo4j . kernel . impl . transaction . log . entry . CheckPoint lastCheckPoint = logTailInformation . lastCheckPoint ; long txIdAfterLastCheckPoint = logTailInformation . firstTxIdAfterLastCheckPoint ; if ( ! ( logTailInformation . commitsAfterLastCheckpoint ( ) ) ) { monitor . noCommitsAfterLastCheckPoint ( ( lastCheckPoint != null ? lastCheckPoint . getLogPosition ( ) : null ) ) ; return createRecoveryInformation ( LogPosition . UNSPECIFIED , txIdAfterLastCheckPoint ) ; } if ( lastCheckPoint != null ) { monitor . commitsAfterLastCheckPoint ( lastCheckPoint . getLogPosition ( ) , txIdAfterLastCheckPoint ) ; return createRecoveryInformation ( lastCheckPoint . getLogPosition ( ) , txIdAfterLastCheckPoint ) ; } else { if ( ( logTailInformation . oldestLogVersionFound ) != ( INITIAL_LOG_VERSION ) ) { long fromLogVersion = java . lang . Math . max ( org . neo4j . kernel . recovery . INITIAL_LOG_VERSION , logTailInformation . oldestLogVersionFound ) ; throw new org . neo4j . kernel . impl . store . UnderlyingStorageException ( ( ( ( "No<sp>check<sp>point<sp>found<sp>in<sp>any<sp>log<sp>file<sp>from<sp>version<sp>" + fromLogVersion ) + "<sp>to<sp>" ) + ( logTailInformation . currentLogVersion ) ) ) ; } monitor . noCheckPointFound ( ) ; return createRecoveryInformation ( org . neo4j . kernel . impl . transaction . log . LogPosition . start ( 0 ) , txIdAfterLastCheckPoint ) ; } }
org . junit . Assert . assertEquals ( description , calledWith . get ( ) )
testFirstDLSNAsync ( ) { org . apache . distributedlog . DLSN dlsn = mock ( org . apache . distributedlog . DLSN . class ) ; when ( impl . getFirstDLSNAsync ( ) ) . thenReturn ( java . util . concurrent . CompletableFuture . completedFuture ( dlsn ) ) ; "<AssertPlaceHolder>" ; verify ( impl , times ( 1 ) ) . getFirstDLSNAsync ( ) ; } result ( com . twitter . util . Future ) { return org . apache . distributedlog . util . FutureUtils . result ( result , com . twitter . util . Duration . Top ( ) ) ; }
org . junit . Assert . assertEquals ( dlsn , org . apache . distributedlog . util . FutureUtils . result ( manager . getFirstDLSNAsync ( ) ) )
testReduceRight15 ( ) { final java . util . concurrent . atomic . AtomicBoolean parCorrect = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; org . stjs . javascript . Array < java . lang . Object > arr = org . stjs . javascript . JSCollections . $array ( 0 , 1 , true , null , new java . lang . Object ( ) , "five" ) ; final java . lang . Double initialValue = 5.5 ; org . stjs . javascript . functions . Function4 < java . lang . Object , java . lang . Object , java . lang . Long , org . stjs . javascript . Array < java . lang . Object > , java . lang . Object > callbackfn = new org . stjs . javascript . functions . Function4 < java . lang . Object , java . lang . Object , java . lang . Long , org . stjs . javascript . Array < java . lang . Object > , java . lang . Object > ( ) { @ org . stjs . javascript . Override public java . lang . Object $invoke ( java . lang . Object prevVal , java . lang . Object curVal , java . lang . Long idx , org . stjs . javascript . Array < java . lang . Object > obj ) { if ( ( ( idx == ( ( obj . $length ( ) ) - 1 ) ) && ( ( obj . $get ( idx ) ) == curVal ) ) && ( prevVal == initialValue ) ) { return curVal ; } else if ( ( ( ( idx + 1 ) < ( obj . $length ( ) ) ) && ( ( obj . $get ( idx ) ) == curVal ) ) && ( ( obj . $get ( ( idx + 1 ) ) ) == prevVal ) ) { return curVal ; } else { return false ; } } } ; "<AssertPlaceHolder>" ; } reduceRight ( org . stjs . javascript . functions . Function2 , T ) { org . stjs . javascript . functions . Function4 f4 = org . stjs . javascript . functions . Functions . f4 ( callbackfn ) ; return ( ( T ) ( reduceRight ( f4 ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , arr . reduceRight ( callbackfn , initialValue ) )
testActionProcessWrongZipFile ( ) { boolean failure = false ; try { executeAction ( "fake" , "zip" ) ; } catch ( it . geosolutions . geobatch . flow . event . action . ActionException e ) { failure = true ; } catch ( java . net . URISyntaxException e ) { org . junit . Assert . fail ( ( "Failure<sp>in<sp>loading<sp>resource<sp>file:<sp>" + ( e . getLocalizedMessage ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } executeAction ( java . lang . String , java . lang . String ) { action = new it . geosolutions . geobatch . actions . ds2ds . Ds2dsAction ( configuration ) ; action . setFailIgnored ( false ) ; java . io . File temp ; try { temp = java . io . File . createTempFile ( "prefix" , "suffix" ) ; temp . delete ( ) ; temp . mkdir ( ) ; action . setTempDir ( temp ) ; } catch ( java . io . IOException e ) { throw new it . geosolutions . geobatch . flow . event . action . ActionException ( action , "Error<sp>creating<sp>temp<sp>folder" ) ; } action . addListener ( listener ) ; java . util . Queue < java . util . EventObject > result = action . execute ( getEvents ( fileName , fileType ) ) ; assertReceivedEvent ( "completed" ) ; assertNotReceivedEvent ( "failed" ) ; return result ; }
org . junit . Assert . assertTrue ( failure )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . kernel . model . LayoutFriendlyURL missingLayoutFriendlyURL = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingLayoutFriendlyURL )
givenResultErrorWhenAddingErrorThenAddErrorIds ( ) { final fr . gouv . vitam . metadata . core . database . collections . ResultError resultError = new fr . gouv . vitam . metadata . core . database . collections . ResultError ( fr . gouv . vitam . common . database . builder . request . configuration . BuilderToken . FILTERARGS . UNITS ) ; resultError . addError ( "errorId" ) ; "<AssertPlaceHolder>" ; } getCurrentIds ( ) { return currentIds ; }
org . junit . Assert . assertEquals ( 1 , resultError . getCurrentIds ( ) . size ( ) )
testMonitoringInfosArePopulatedForABeamCounter ( ) { org . apache . beam . runners . core . metrics . MetricsContainerImpl testObject = new org . apache . beam . runners . core . metrics . MetricsContainerImpl ( "step1" ) ; java . util . HashMap < java . lang . String , java . lang . String > labels = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; labels . put ( MonitoringInfoConstants . Labels . PCOLLECTION , "pcollection" ) ; org . apache . beam . sdk . metrics . MetricName name = org . apache . beam . runners . core . metrics . MonitoringInfoMetricName . named ( MonitoringInfoConstants . Urns . ELEMENT_COUNT , labels ) ; org . apache . beam . runners . core . metrics . CounterCell c1 = testObject . getCounter ( name ) ; c1 . inc ( 2L ) ; org . apache . beam . runners . core . metrics . SimpleMonitoringInfoBuilder builder1 = new org . apache . beam . runners . core . metrics . SimpleMonitoringInfoBuilder ( ) ; builder1 . setUrn ( MonitoringInfoConstants . Urns . ELEMENT_COUNT ) ; builder1 . setPCollectionLabel ( "pcollection" ) ; builder1 . setInt64Value ( 2 ) ; builder1 . build ( ) ; java . util . ArrayList < org . apache . beam . model . pipeline . v1 . MetricsApi . MonitoringInfo > actualMonitoringInfos = new java . util . ArrayList < org . apache . beam . model . pipeline . v1 . MetricsApi . MonitoringInfo > ( ) ; for ( org . apache . beam . model . pipeline . v1 . MetricsApi . MonitoringInfo mi : testObject . getMonitoringInfos ( ) ) { actualMonitoringInfos . add ( org . apache . beam . runners . core . metrics . SimpleMonitoringInfoBuilder . clearTimestamp ( mi ) ) ; } "<AssertPlaceHolder>" ; } containsInAnyOrder ( T extends java . io . Serializable [ ] ) { return org . apache . beam . sdk . testing . SerializableMatchers . fromSupplier ( ( ) -> org . hamcrest . Matchers . containsInAnyOrder ( items ) ) ; }
org . junit . Assert . assertThat ( actualMonitoringInfos , containsInAnyOrder ( builder1 . build ( ) ) )
nextShouldIncrementPorts ( ) { final int startPort = 10 ; final int portCount = 101 ; final redis . embedded . ports . SequencePortProvider provider = new redis . embedded . ports . SequencePortProvider ( startPort ) ; int max = 0 ; for ( int i = 0 ; i < portCount ; i ++ ) { int port = provider . next ( ) ; if ( port > max ) { max = port ; } } "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( current . hasNext ( ) ) ) { throw new redis . embedded . exceptions . RedisBuildingException ( "Run<sp>out<sp>of<sp>Redis<sp>ports!" ) ; } return current . next ( ) ; }
org . junit . Assert . assertEquals ( ( ( portCount + startPort ) - 1 ) , max )
testStaticListType ( ) { com . adobe . cq . wcm . core . components . models . List list = getListUnderTest ( com . adobe . cq . wcm . core . components . internal . models . v1 . ListImplTest . LIST_2 ) ; "<AssertPlaceHolder>" ; com . adobe . cq . wcm . core . components . Utils . testJSONExport ( list , com . adobe . cq . wcm . core . components . Utils . getTestExporterJSONPath ( com . adobe . cq . wcm . core . components . internal . models . v1 . ListImplTest . TEST_BASE , com . adobe . cq . wcm . core . components . internal . models . v1 . ListImplTest . LIST_2 ) ) ; } getItems ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 2 , list . getItems ( ) . size ( ) )
testHashCode ( ) { org . drugis . addis . entities . Drug d1 = new org . drugis . addis . entities . Drug ( "Paroxetine" , "atc" ) ; org . drugis . addis . entities . Drug d2 = new org . drugis . addis . entities . Drug ( "Paroxetine" , "atc" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return new org . apache . commons . lang . builder . HashCodeBuilder ( 17 , 37 ) . append ( d_class ) . append ( d_isPrimary ) . append ( d_whenTaken ) . toHashCode ( ) ; }
org . junit . Assert . assertEquals ( d1 . hashCode ( ) , d2 . hashCode ( ) )
testUpdateTableFail1 ( ) { org . mockito . Mockito . doAnswer ( ( ( org . mockito . stubbing . Answer < java . lang . Void > ) ( ( invocation ) -> { final RpcResult < List < org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . protocol . rev130731 . MultipartReply > > rpcResult = org . opendaylight . yangtools . yang . common . RpcResultBuilder . < List < org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . protocol . rev130731 . MultipartReply > > failed ( ) . build ( ) ; handleResultFuture . set ( rpcResult ) ; return null ; } ) ) ) . when ( multiMessageCollector ) . endCollecting ( org . mockito . ArgumentMatchers . any ( ) ) ; final java . util . concurrent . Future < org . opendaylight . yangtools . yang . common . RpcResult < org . opendaylight . yang . gen . v1 . urn . opendaylight . table . service . rev131026 . UpdateTableOutput > > rpcResultFuture = salTableService . updateTable ( prepareUpdateTable ( ) ) ; "<AssertPlaceHolder>" ; verify ( mockedRequestContextStack ) . createRequestContext ( ) ; } prepareUpdateTable ( ) { org . opendaylight . yang . gen . v1 . urn . opendaylight . table . service . rev131026 . UpdateTableInputBuilder updateTableInputBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . table . service . rev131026 . UpdateTableInputBuilder ( ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . table . service . rev131026 . table . update . UpdatedTableBuilder updatedTableBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . table . service . rev131026 . table . update . UpdatedTableBuilder ( ) ; updatedTableBuilder . setTableFeatures ( java . util . Collections . emptyList ( ) ) ; updateTableInputBuilder . setUpdatedTable ( updatedTableBuilder . build ( ) ) ; return updateTableInputBuilder . build ( ) ; }
org . junit . Assert . assertNotNull ( rpcResultFuture )
testMinWithInvalidRange2 ( ) { org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . conf ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . addFamily ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . TEST_FAMILY ) ; scan . setStartRow ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . ROWS [ 6 ] ) ; scan . setStopRow ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . ROWS [ 6 ] ) ; final org . apache . hadoop . hbase . coprocessor . ColumnInterpreter < java . lang . Long , java . lang . Long > ci = new org . apache . hadoop . hbase . client . coprocessor . LongColumnInterpreter ( ) ; java . lang . Long min = null ; try { min = aClient . min ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . TEST_TABLE , ci , scan ) ; } catch ( java . lang . Throwable e ) { } "<AssertPlaceHolder>" ; } min ( byte [ ] , org . apache . hadoop . hbase . coprocessor . ColumnInterpreter , org . apache . hadoop . hbase . client . Scan ) { validateParameters ( scan ) ; class MinCallBack implements org . apache . hadoop . hbase . client . coprocessor . Batch . Callback < R > { private R min = null ; public R getMinimum ( ) { return min ; } @ org . apache . hadoop . hbase . client . coprocessor . Override public synchronized void update ( byte [ ] region , byte [ ] row , R result ) { min = ( ( ( min ) == null ) || ( ( result != null ) && ( ( ci . compare ( result , min ) ) < 0 ) ) ) ? result : min ; } } MinCallBack minCallBack = new MinCallBack ( ) ; org . apache . hadoop . hbase . client . HTable table = null ; try { table = new org . apache . hadoop . hbase . client . HTable ( conf , tableName ) ; table . coprocessorExec ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol . class , scan . getStartRow ( ) , scan . getStopRow ( ) , new Batch . Call < org . apache . hadoop . hbase . coprocessor . AggregateProtocol , R > ( ) { @ java . lang . Override public org . apache . hadoop . hbase . client . coprocessor . R call ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol instance ) throws java . io . IOException { return instance . getMin ( ci , scan ) ; } } , minCallBack ) ; } finally { if ( table != null ) { table . close ( ) ; } } org . apache . hadoop . hbase . client . coprocessor . AggregationClient . log . debug ( ( "Min<sp>fom<sp>all<sp>regions<sp>is:<sp>" + ( minCallBack . getMinimum ( ) ) ) ) ; return minCallBack . getMinimum ( ) ; }
org . junit . Assert . assertEquals ( null , min )
testDisabledWAL ( ) { org . apache . hadoop . hbase . wal . TestDisabledWAL . LOG . info ( ( "Writing<sp>data<sp>to<sp>table<sp>" + ( tableName ) ) ) ; org . apache . hadoop . hbase . client . Put p = new org . apache . hadoop . hbase . client . Put ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) ) ; p . addColumn ( fam , org . apache . hadoop . hbase . util . Bytes . toBytes ( "qual" ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "val" ) ) ; table . put ( p ) ; org . apache . hadoop . hbase . wal . TestDisabledWAL . LOG . info ( ( "Flushing<sp>table<sp>" + ( tableName ) ) ) ; org . apache . hadoop . hbase . wal . TestDisabledWAL . TEST_UTIL . flush ( tableName ) ; org . apache . hadoop . hbase . wal . TestDisabledWAL . LOG . info ( ( "Getting<sp>data<sp>from<sp>table<sp>" + ( tableName ) ) ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) ) ; org . apache . hadoop . hbase . client . Result result = table . get ( get ) ; "<AssertPlaceHolder>" ; } getValue ( byte [ ] , byte [ ] ) { org . apache . hadoop . hbase . Cell kv = getColumnLatestCell ( family , qualifier ) ; if ( kv == null ) { return null ; } return org . apache . hadoop . hbase . CellUtil . cloneValue ( kv ) ; }
org . junit . Assert . assertNotNull ( result . getValue ( fam , org . apache . hadoop . hbase . util . Bytes . toBytes ( "qual" ) ) )
shouldHaveASignOfZero ( ) { com . wesabe . api . util . money . Money zeroDollars = new com . wesabe . api . util . money . Money ( decimal ( "0.00" ) , USD ) ; "<AssertPlaceHolder>" ; } signum ( ) { return amount . signum ( ) ; }
org . junit . Assert . assertEquals ( 0 , zeroDollars . signum ( ) )
getNumberValueFromJsonObject_input_key_null ( ) { java . lang . String jsonString = "{\"deviceId\":\"xxx-device\",\"generationId\":\"111111111111111111\",\"etag\":\"MA==\",\"connectionState\":\"Disconnected\",\"status\":\"Disabled\",\"statusReason\":null,\"connectionStateUpdatedTime\":\"0001-01-01T00:00:00\",\"statusUpdatedTime\":\"0001-01-01T00:00:00\",\"lastActivityTime\":\"0001-01-01T00:00:00\",\"cloudToDeviceMessageCount\":0,\"authentication\":{\"symmetricKey\":{\"primaryKey\":\"AAABBBCCC111222333444000\",\"secondaryKey\":\"111222333444555AAABBBCCC\"}}}" ; java . io . StringReader stringReader = new java . io . StringReader ( jsonString ) ; javax . json . JsonReader jsonReader = javax . json . Json . createReader ( stringReader ) ; javax . json . JsonObject jsonObject = jsonReader . readObject ( ) ; java . lang . String key = null ; long expResult = 0 ; long result = com . microsoft . azure . sdk . iot . service . Tools . getNumberValueFromJsonObject ( jsonObject , key ) ; "<AssertPlaceHolder>" ; } getNumberValueFromJsonObject ( javax . json . JsonObject , java . lang . String ) { long retVal ; javax . json . JsonNumber jsonNumber = null ; if ( ( ( ( jsonObject == null ) || ( jsonObject == ( javax . json . JsonObject . NULL ) ) ) || ( key == null ) ) || ( ( key . length ( ) ) == 0 ) ) { retVal = 0 ; } else { javax . json . JsonValue jsonValue = jsonObject . get ( key ) ; if ( jsonValue != ( javax . json . JsonValue . NULL ) ) { jsonNumber = jsonObject . getJsonNumber ( key ) ; if ( jsonNumber != null ) { retVal = jsonNumber . longValue ( ) ; } else { retVal = 0 ; } } else { retVal = 0 ; } } return retVal ; }
org . junit . Assert . assertEquals ( expResult , result )
getLabel ( ) { org . phenotips . translation . TranslationManager tm = this . mocker . getInstance ( org . phenotips . translation . TranslationManager . class ) ; when ( tm . translate ( "phenotips.permissions.visibility.public.label" ) ) . thenReturn ( "Public" ) ; "<AssertPlaceHolder>" ; } getLabel ( ) { org . phenotips . translation . TranslationManager tm = this . mocker . getInstance ( org . phenotips . translation . TranslationManager . class ) ; when ( tm . translate ( "phenotips.permissions.accessLevels.view.label" ) ) . thenReturn ( "Viewer" ) ; org . junit . Assert . assertEquals ( "Viewer" , this . mocker . getComponentUnderTest ( ) . getLabel ( ) ) ; }
org . junit . Assert . assertEquals ( "Public" , this . mocker . getComponentUnderTest ( ) . getLabel ( ) )
testSimpleWithDecimalsTrunc ( ) { org . apache . commons . math . linear . ArrayRealVector c = new org . apache . commons . math . linear . ArrayRealVector ( new double [ ] { 1.2323 , 1.4343 , 1.6333 } ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "43;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "63}" ; java . lang . String actual = realVectorFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
nextDown3 ( ) { org . diirt . graphene . TimeScales . TimePeriod period = org . diirt . graphene . TimeScales . nextDown ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 5 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( period , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 2 ) ) )
selectorWithoutIndicatorsPattern ( ) { final java . lang . String expectedValue = "This<sp>is<sp>the<sp>expected<sp>value" ; final org . marc4j . marc . Record record = newRecord ( eu . aliada . rdfizer . pipeline . format . marc . selector . binary . A_VARIABLE_FIELD_NAME , '#' , '#' , 'a' , expectedValue ) ; final eu . aliada . rdfizer . pipeline . format . marc . selector . binary . VariableFieldExpression expression = new eu . aliada . rdfizer . pipeline . format . marc . selector . binary . VariableFieldExpression ( ( ( A_VARIABLE_FIELD_NAME ) + "a" ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . xml . sax . InputSource ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( expectedValue , expression . evaluate ( record ) )
whenLog2IntegerValues_shouldLog2ThemAndReturnTheResultForCeilingRounding ( ) { int result = com . google . common . math . IntMath . log2 ( 30 , RoundingMode . CEILING ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 5 , result )
testRun_NullName_Help ( ) { when ( mockCli . commandName ( ) ) . thenReturn ( null ) ; io . bootique . command . Command mockHelp = io . bootique . run . DefaultRunnerTest . mockCommand ( "h1" , io . bootique . command . CommandOutcome . succeeded ( ) ) ; io . bootique . command . Command mockC1 = io . bootique . run . DefaultRunnerTest . mockCommand ( "c1" , io . bootique . command . CommandOutcome . succeeded ( ) , "c1o1" , "c1o2" ) ; io . bootique . command . Command mockC2 = io . bootique . run . DefaultRunnerTest . mockCommand ( "c2" , io . bootique . command . CommandOutcome . succeeded ( ) , "c2o1" ) ; io . bootique . command . CommandOutcome result = run ( java . util . Optional . empty ( ) , java . util . Optional . of ( mockHelp ) , mockC1 , mockC2 ) ; "<AssertPlaceHolder>" ; verify ( mockC1 , times ( 0 ) ) . run ( mockCli ) ; verify ( mockC2 , times ( 0 ) ) . run ( mockCli ) ; verify ( mockHelp ) . run ( mockCli ) ; } isSuccess ( ) { return ( exitCode ) == ( io . bootique . command . CommandOutcome . SUCCESS_EXIT_CODE ) ; }
org . junit . Assert . assertTrue ( result . isSuccess ( ) )
testMax ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='maxField']//xs:maxInclusive/@value<sp>=<sp>3" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
testCommandNestedCommandFailure ( ) { mHelper . registerEventListener ( mActivity , mActivity ) ; final org . scribe . model . OAuthRequest mockedRequest = mock ( org . scribe . model . OAuthRequest . class ) ; com . whiterabbit . postman . NestedRestRequest s = new com . whiterabbit . postman . NestedRestRequest ( mockedRequest , false ) ; com . whiterabbit . postman . commands . RestServerCommand command = new com . whiterabbit . postman . commands . RestServerCommand ( s ) { @ com . whiterabbit . postman . Override protected org . scribe . model . OAuthRequest getRequest ( org . scribe . model . Verb v , java . lang . String url ) { return mockedRequest ; } } ; when ( mockedRequest . send ( ) ) . thenThrow ( new org . scribe . exceptions . OAuthException ( "Fava" ) ) ; command . execute ( mActivity ) ; verify ( mockedRequest ) . addHeader ( "Key" , "Value" ) ; verify ( mockedRequest ) . send ( ) ; "<AssertPlaceHolder>" ; } isIsFailure ( ) { return mIsFailure ; }
org . junit . Assert . assertTrue ( mActivity . isIsFailure ( ) )
testExecuteGroupSubscribed ( ) { sut = new org . eurekastreams . server . persistence . mappers . db . notification . GetStreamActivitySubscriptionDbMapper ( org . eurekastreams . server . domain . EntityType . GROUP ) ; ( ( org . eurekastreams . server . persistence . mappers . BaseDomainMapper ) ( sut ) ) . setEntityManager ( getEntityManager ( ) ) ; org . eurekastreams . server . persistence . mappers . requests . GetStreamActivitySubscriptionMapperRequest request = new org . eurekastreams . server . persistence . mappers . requests . GetStreamActivitySubscriptionMapperRequest ( 98 , 1 ) ; "<AssertPlaceHolder>" ; } execute ( java . util . List ) { java . util . List < java . lang . Long > personIds = new java . util . ArrayList < java . lang . Long > ( ) ; java . util . List < java . lang . Long > groupIds = new java . util . ArrayList < java . lang . Long > ( ) ; java . lang . Long id ; for ( org . eurekastreams . server . domain . dto . DisplayInfoSettable ds : inDisplaySettables ) { id = ds . getEntityId ( ) ; switch ( ds . getEntityType ( ) ) { case PERSON : if ( ! ( personIds . contains ( id ) ) ) { personIds . add ( id ) ; } break ; case GROUP : if ( ! ( groupIds . contains ( id ) ) ) { groupIds . add ( id ) ; } break ; default : break ; } } java . util . List < org . eurekastreams . server . search . modelview . PersonModelView > personDTOs = getPersonModelViewsByIdsMapper . execute ( personIds ) ; java . util . List < org . eurekastreams . server . search . modelview . DomainGroupModelView > groupDTOs = getGroupModelViewsByIdsMapper . execute ( groupIds ) ; java . util . Map < java . lang . String , org . eurekastreams . server . search . modelview . PersonModelView > peopleByAccountIdsMap = new java . util . HashMap < java . lang . String , org . eurekastreams . server . search . modelview . PersonModelView > ( ) ; java . util . Map < java . lang . String , org . eurekastreams . server . search . modelview . DomainGroupModelView > domainGroupsByShortNamesMap = new java . util . HashMap < java . lang . String , org . eurekastreams . server . search . modelview . DomainGroupModelView > ( ) ; for ( org . eurekastreams . server . search . modelview . PersonModelView person : personDTOs ) { peopleByAccountIdsMap . put ( person . getAccountId ( ) , person ) ; } for ( org . eurekastreams . server . search . modelview . DomainGroupModelView domainGroup : groupDTOs ) { domainGroupsByShortNamesMap . put ( domainGroup . getShortName ( ) , domainGroup ) ; } org . eurekastreams . server . search . modelview . PersonModelView pmv ; org . eurekastreams . server . search . modelview . DomainGroupModelView gmv ; for ( org . eurekastreams . server . domain . dto . DisplayInfoSettable ds : inDisplaySettables ) { if ( ( ds . getEntityType ( ) ) == ( org . eurekastreams . server . domain . EntityType . PERSON ) ) { pmv = peopleByAccountIdsMap . get ( ds . getStreamUniqueKey ( ) ) ; if ( pmv != null ) { ds . setAvatarId ( pmv . getAvatarId ( ) ) ; ds . setDisplayName ( pmv . getDisplayName ( ) ) ; } } else if ( ( ds . getEntityType ( ) ) == ( org . eurekastreams . server . domain . EntityType . GROUP ) ) { gmv = domainGroupsByShortNamesMap . get ( ds . getStreamUniqueKey ( ) ) ; if ( gmv != null ) { ds . setAvatarId ( gmv . getAvatarId ( ) ) ; ds . setDisplayName ( gmv . getDisplayName ( ) ) ; } } } return inDisplaySettables ; }
org . junit . Assert . assertTrue ( sut . execute ( request ) )
testInsertRetrieveInteger ( ) { org . mongojack . mock . MockObject object = new org . mongojack . mock . MockObject ( ) ; object . integer = 10 ; coll . insert ( object ) ; org . mongojack . mock . MockObject result = coll . findOne ( ) ; "<AssertPlaceHolder>" ; } findOne ( ) { return findOne ( new org . bson . Document ( ) ) ; }
org . junit . Assert . assertEquals ( object . integer , result . integer )
testClassDefaultNull ( ) { org . skife . config . TestDefaultsPresent . EmptyClassDefaultNull ec = cof . build ( org . skife . config . TestDefaultsPresent . EmptyClassDefaultNull . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertNull ( ec . getValue ( ) )
lastModificationTimeDelete ( ) { mFsMaster . createDirectory ( new alluxio . AlluxioURI ( "/testFolder" ) , alluxio . master . file . contexts . CreateDirectoryContext . defaults ( ) ) ; mFsMaster . createFile ( new alluxio . AlluxioURI ( "/testFolder/testFile" ) , alluxio . master . file . contexts . CreateFileContext . defaults ( ) ) ; long folderId = mFsMaster . getFileId ( new alluxio . AlluxioURI ( "/testFolder" ) ) ; long modificationTimeBeforeDelete = mFsMaster . getFileInfo ( folderId ) . getLastModificationTimeMs ( ) ; alluxio . util . CommonUtils . sleepMs ( 2 ) ; mFsMaster . delete ( new alluxio . AlluxioURI ( "/testFolder/testFile" ) , alluxio . master . file . contexts . DeleteContext . mergeFrom ( alluxio . grpc . DeletePOptions . newBuilder ( ) . setRecursive ( true ) ) ) ; long modificationTimeAfterDelete = mFsMaster . getFileInfo ( folderId ) . getLastModificationTimeMs ( ) ; "<AssertPlaceHolder>" ; } getLastModificationTimeMs ( ) { return mDelegate . getLastModificationTimeMs ( ) ; }
org . junit . Assert . assertTrue ( ( modificationTimeBeforeDelete < modificationTimeAfterDelete ) )
getAllFromContainerTest ( ) { java . util . List < org . openstack4j . model . storage . object . SwiftContainer > list = new java . util . ArrayList ( ) ; list . add ( mockOsContainer ) ; doReturn ( list ) . when ( containerService ) . list ( ) ; when ( endpoint . getOperation ( ) ) . thenReturn ( OpenstackConstants . GET_ALL ) ; msg . setHeader ( SwiftConstants . CONTAINER_NAME , org . apache . camel . component . openstack . swift . ContainerProducerTest . CONTAINER_NAME ) ; producer . process ( exchange ) ; "<AssertPlaceHolder>" ; } getBody ( com . amazonaws . services . simpleemail . model . SendEmailRequest ) { return sendEmailRequest . getMessage ( ) . getBody ( ) . getText ( ) . getData ( ) ; }
org . junit . Assert . assertEquals ( mockOsContainer , msg . getBody ( java . util . List . class ) . get ( 0 ) )
isHoldingRequest ( ) { final long timeLapseRegularRequest = getRequestLapseWithNoHold ( ) ; final long timeLapseRequestWithHold = getRequestLapseWithHold ( ) ; final long regularRequestWithHoldTime = timeLapseRegularRequest + ( test . com . uaihebert . uaimockserver . validation . HoldTheRequestTest . MIN_TIME_WAITING ) ; final java . lang . String expected = java . lang . String . format ( test . com . uaihebert . uaimockserver . validation . HoldTheRequestTest . ASSERTING_TEXT , timeLapseRequestWithHold , regularRequestWithHoldTime ) ; "<AssertPlaceHolder>" ; } getRequestLapseWithHold ( ) { final java . util . Date beforeRequest = new java . util . Date ( ) ; final java . lang . String url = "http://localhost:1234/uaiMockServer/holdTheRequest" ; final javax . ws . rs . client . Client client = javax . ws . rs . client . ClientBuilder . newClient ( ) ; client . target ( url ) . request ( ) . get ( ) ; final java . util . Date afterRequest = new java . util . Date ( ) ; return ( afterRequest . getTime ( ) ) - ( beforeRequest . getTime ( ) ) ; }
org . junit . Assert . assertTrue ( expected , ( timeLapseRequestWithHold >= regularRequestWithHoldTime ) )
test ( ) { final com . querydsl . core . types . MappingProjection < com . querydsl . collections . MappingProjectionTest . ResultPart > key = new com . querydsl . core . types . MappingProjection < com . querydsl . collections . MappingProjectionTest . ResultPart > ( com . querydsl . collections . MappingProjectionTest . ResultPart . class , cat . name ) { @ com . querydsl . collections . Override protected com . querydsl . collections . MappingProjectionTest . ResultPart map ( com . querydsl . core . Tuple row ) { return new com . querydsl . collections . MappingProjectionTest . ResultPart ( ) ; } } ; java . util . List < com . querydsl . collections . MappingProjectionTest . ResultObject > list = query ( ) . from ( cat , cats ) . select ( new com . querydsl . core . types . MappingProjection < com . querydsl . collections . MappingProjectionTest . ResultObject > ( com . querydsl . collections . MappingProjectionTest . ResultObject . class , key ) { @ com . querydsl . collections . Override protected com . querydsl . collections . MappingProjectionTest . ResultObject map ( com . querydsl . core . Tuple row ) { com . querydsl . collections . MappingProjectionTest . ResultPart consolidationKey = row . get ( key ) ; return new com . querydsl . collections . MappingProjectionTest . ResultObject ( ) ; } } ) . fetch ( ) ; "<AssertPlaceHolder>" ; } size ( ) { query ( store , store . products . size ( ) . gt ( 0 ) ) ; }
org . junit . Assert . assertEquals ( cats . size ( ) , list . size ( ) )
bestaandeLandGebied_2165_niet ( ) { final nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement relatie = new nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElement ( nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . ATTRIBUTEN , null , null , null , null , new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . PEIL_DATUM ) , null , null , new nl . bzk . brp . bijhouding . bericht . model . StringElement ( nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . BUITENLANDSEPLAATS ) , null , null , nl . bzk . brp . bijhouding . bericht . model . RelatieGroepElementTest . SPANJE , null , null , null , null ) ; relatie . setVerzoekBericht ( getBericht ( ) ) ; "<AssertPlaceHolder>" ; } valideerInhoud ( ) { return java . util . Collections . emptyList ( ) ; }
org . junit . Assert . assertEquals ( 0 , relatie . valideerInhoud ( ) . size ( ) )
testGetName ( ) { org . owasp . dependencycheck . analyzer . VersionFilterAnalyzer instance = new org . owasp . dependencycheck . analyzer . VersionFilterAnalyzer ( ) ; java . lang . String expResult = "Version<sp>Filter<sp>Analyzer" ; java . lang . String result = instance . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return "test-project" ; }
org . junit . Assert . assertEquals ( expResult , result )
testSubResource ( ) { final com . sebastian_daschner . jaxrs_analyzer . analysis . results . Resources expectedResult = new com . sebastian_daschner . jaxrs_analyzer . analysis . results . Resources ( ) ; expectedResult . setBasePath ( "path" ) ; final com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResourceMethod resourceGetMethod = com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResourceMethodBuilder . withMethod ( HttpMethod . GET ) . andResponse ( 200 , com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResponseBuilder . withResponseBody ( com . sebastian_daschner . jaxrs_analyzer . analysis . results . TypeUtils . STRING_IDENTIFIER ) . build ( ) ) . build ( ) ; expectedResult . addMethod ( "test" , resourceGetMethod ) ; final com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResourceMethod resourcePostMethod = com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResourceMethodBuilder . withMethod ( HttpMethod . POST ) . andResponse ( 204 , com . sebastian_daschner . jaxrs_analyzer . analysis . results . ResponseBuilder . newBuilder ( ) . build ( ) ) . build ( ) ; expectedResult . addMethod ( "test/sub" , resourcePostMethod ) ; final com . sebastian_daschner . jaxrs_analyzer . model . results . ClassResult appPathResult = com . sebastian_daschner . jaxrs_analyzer . analysis . results . ClassResultBuilder . withApplicationPath ( "/path" ) . build ( ) ; final com . sebastian_daschner . jaxrs_analyzer . model . results . MethodResult method = com . sebastian_daschner . jaxrs_analyzer . analysis . results . MethodResultBuilder . withResponses ( com . sebastian_daschner . jaxrs_analyzer . analysis . results . HttpResponseBuilder . withStatues ( 200 ) . andEntityTypes ( Types . STRING ) . build ( ) ) . andMethod ( HttpMethod . GET ) . build ( ) ; final com . sebastian_daschner . jaxrs_analyzer . model . results . MethodResult subResourceLocator = com . sebastian_daschner . jaxrs_analyzer . analysis . results . MethodResultBuilder . newBuilder ( ) . andPath ( "/sub" ) . build ( ) ; final com . sebastian_daschner . jaxrs_analyzer . model . results . MethodResult subResourceMethod = com . sebastian_daschner . jaxrs_analyzer . analysis . results . MethodResultBuilder . withResponses ( com . sebastian_daschner . jaxrs_analyzer . analysis . results . HttpResponseBuilder . withStatues ( 204 ) . build ( ) ) . andMethod ( HttpMethod . POST ) . build ( ) ; subResourceLocator . setSubResource ( com . sebastian_daschner . jaxrs_analyzer . analysis . results . ClassResultBuilder . withResourcePath ( null ) . andMethods ( subResourceMethod ) . build ( ) ) ; final com . sebastian_daschner . jaxrs_analyzer . model . results . ClassResult resClassResult = com . sebastian_daschner . jaxrs_analyzer . analysis . results . ClassResultBuilder . withResourcePath ( "/test" ) . andMethods ( method , subResourceLocator ) . build ( ) ; final java . util . Set < com . sebastian_daschner . jaxrs_analyzer . model . results . ClassResult > results = new java . util . HashSet ( java . util . Arrays . asList ( appPathResult , resClassResult ) ) ; final com . sebastian_daschner . jaxrs_analyzer . analysis . results . Resources actualResult = classUnderTest . interpret ( results ) ; "<AssertPlaceHolder>" ; } interpret ( java . util . Set ) { resources = new com . sebastian_daschner . jaxrs_analyzer . model . rest . Resources ( ) ; resources . setBasePath ( com . sebastian_daschner . jaxrs_analyzer . analysis . results . PathNormalizer . getApplicationPath ( classResults ) ) ; javaTypeAnalyzer = new com . sebastian_daschner . jaxrs_analyzer . analysis . results . JavaTypeAnalyzer ( resources . getTypeRepresentations ( ) ) ; dynamicTypeAnalyzer = new com . sebastian_daschner . jaxrs_analyzer . analysis . results . DynamicTypeAnalyzer ( resources . getTypeRepresentations ( ) ) ; stringParameterResolver = new com . sebastian_daschner . jaxrs_analyzer . analysis . results . StringParameterResolver ( resources . getTypeRepresentations ( ) , javaTypeAnalyzer ) ; classResults . stream ( ) . filter ( ( c ) -> ( c . getResourcePath ( ) ) != null ) . forEach ( this :: interpretClassResult ) ; resources . consolidateMultiplePaths ( ) ; return resources ; }
org . junit . Assert . assertEquals ( expectedResult , actualResult )
whenCalculateFactorialOfZeroThenResultOne ( ) { vkaretko . Task_4_2 . Factorial factorial = new vkaretko . Task_4_2 . Factorial ( 0 ) ; "<AssertPlaceHolder>" ; } calculate ( ) { long result = 1 ; if ( ( this . n ) >= 0 ) { for ( int i = 1 ; i <= ( this . n ) ; i ++ ) { result *= i ; } } else { System . out . println ( "Non<sp>positive<sp>number" ) ; result = 0 ; } return result ; }
org . junit . Assert . assertThat ( factorial . calculate ( ) , org . hamcrest . core . Is . is ( 1L ) )
testUniqueIdValues ( ) { java . util . List < java . lang . Short > retrievedIdValues = new java . util . ArrayList < java . lang . Short > ( ) ; for ( eu . bitwalker . useragentutils . Application application : eu . bitwalker . useragentutils . Application . values ( ) ) { "<AssertPlaceHolder>" ; retrievedIdValues . add ( application . getId ( ) ) ; } } contains ( java . lang . Object ) { return getEm ( ) . contains ( o ) ; }
org . junit . Assert . assertTrue ( ( ! ( retrievedIdValues . contains ( application . getId ( ) ) ) ) )
shouldAddObjectInNestedObjectArrayObjectColumn ( ) { org . springframework . data . crate . core . mapping . schema . Column objectColOne = createColumn ( "map" , java . util . Map . class , null , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectColTwo = createColumn ( "longs" , java . util . Set . class , org . springframework . data . crate . core . sql . Long . class , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectCol = createColumn ( "entity.nested.objectArray.Element.object" , java . lang . Object . class , null , false ) ; objectCol . setSubColumns ( asList ( objectColOne , objectColTwo ) ) ; org . springframework . data . crate . core . sql . CrateSQLStatement statement = new org . springframework . data . crate . core . sql . AlterTable ( "testTable" , objectCol ) ; java . lang . StringBuilder sql = new java . lang . StringBuilder ( "ALTER<sp>TABLE<sp>testTable<sp>ADD<sp>COLUMN<sp>" ) ; sql . append ( "\"entity\"[\'nested\'][\'objectArray\'][\'Element\'][\'object\']<sp>" ) ; sql . append ( "object<sp>AS<sp>(\"map\"<sp>object,<sp>\"longs\"<sp>array(long))" ) ; "<AssertPlaceHolder>" ; } createStatement ( ) { return org . springframework . data . crate . core . sql . DROP_TABLE . concat ( org . springframework . data . crate . core . sql . SPACE ) . concat ( tableName ) ; }
org . junit . Assert . assertThat ( statement . createStatement ( ) , org . hamcrest . Matchers . is ( sql . toString ( ) ) )
equalHashCodes ( ) { final java . lang . String groupId = "groupId" ; final java . lang . String artifactId = "artifactId" ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion1 = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusionImpl ( groupId , artifactId ) ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion2 = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusionImpl ( groupId , artifactId ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( classifier ) == null ? 0 : classifier . hashCode ( ) ) ; result = ( prime * result ) + ( ( packaging ) == null ? 0 : packaging . hashCode ( ) ) ; return result ; }
org . junit . Assert . assertTrue ( ( ( exclusion1 . hashCode ( ) ) == ( exclusion2 . hashCode ( ) ) ) )
filter_A$Function1 ( ) { com . m3 . scalaflavor4j . ForkJoinParSeq < java . lang . String > target = com . m3 . scalaflavor4j . ForkJoinParSeq . apply ( list ) ; com . m3 . scalaflavor4j . ParSeq < java . lang . String > actual = target . filter ( new com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang . Boolean > ( ) { public com . m3 . scalaflavor4j . Boolean apply ( java . lang . String v1 ) { return ( v1 != null ) && ( v1 . contains ( "f" ) ) ; } } ) ; "<AssertPlaceHolder>" ; } toSeq ( ) { return com . m3 . scalaflavor4j . Seq . apply ( new com . m3 . scalaflavor4j . ArrayList < T > ( collection ) ) ; }
org . junit . Assert . assertThat ( actual . toSeq ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 20 ) ) )
testCreationOfExceptionIsAsExpected ( ) { final com . gazbert . bxbot . trading . api . ExchangeNetworkException exception = new com . gazbert . bxbot . trading . api . ExchangeNetworkException ( com . gazbert . bxbot . trading . api . TestExchangeNetworkExceptionCreation . ERROR_MSG ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( com . gazbert . bxbot . trading . api . TestExchangeNetworkExceptionCreation . ERROR_MSG , exception . getMessage ( ) )
testIsDeleteRefAction ( ) { classUnderTest . setDeleteRefAction ( true ) ; "<AssertPlaceHolder>" ; } isDeleteRefAction ( ) { return deleteRefAction ; }
org . junit . Assert . assertEquals ( true , classUnderTest . isDeleteRefAction ( ) )
testOutsideFollowedByOutside ( ) { java . lang . String outcome = opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . OTHER ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "something" , "something" , "something" } ; java . lang . String [ ] outcomesSequence = new java . lang . String [ ] { opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . OTHER } ; "<AssertPlaceHolder>" ; } validSequence ( int , java . lang . String [ ] , java . lang . String [ ] , java . lang . String ) { if ( outcome . endsWith ( BioCodec . CONTINUE ) ) { int li = ( outcomesSequence . length ) - 1 ; if ( li == ( - 1 ) ) { return false ; } else if ( outcomesSequence [ li ] . endsWith ( BioCodec . OTHER ) ) { return false ; } else if ( ( outcomesSequence [ li ] . endsWith ( BioCodec . CONTINUE ) ) || ( outcomesSequence [ li ] . endsWith ( BioCodec . START ) ) ) { java . lang . String previousNameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcomesSequence [ li ] ) ; java . lang . String nameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcome ) ; if ( ( previousNameType != null ) || ( nameType != null ) ) { if ( nameType != null ) { if ( nameType . equals ( previousNameType ) ) { return true ; } } return false ; } } } return true ; }
org . junit . Assert . assertTrue ( opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) )
testGetSwitchPortsForInvalidSwitchId ( ) { com . vmware . vrack . hms . node . switches . SwitchNodeConnectorTest . logger . info ( "[TS]<sp>:<sp>testGetSwitchPortsForInvalidSwitchId" ) ; java . lang . String switchId = "S99" ; com . vmware . vrack . hms . node . switches . SwitchNodeConnectorTest . logger . info ( "[TS]<sp>:<sp>Expected<sp>result<sp>:<sp>ArrayIndexOutOfBoundsException" ) ; java . util . List < java . lang . String > result = com . vmware . vrack . hms . node . switches . SwitchNodeConnector . getInstance ( ) . getSwitchPorts ( switchId ) ; com . vmware . vrack . hms . node . switches . SwitchNodeConnectorTest . logger . info ( ( "[TS]<sp>:<sp>Expected<sp>result<sp>:<sp>Result<sp>List<sp>Is<sp>empty<sp>=<sp>true,<sp>actual<sp>result<sp>:<sp>Result<sp>List<sp>Is<sp>empty<sp>=" + ( result . isEmpty ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getSwitchPorts ( java . lang . String ) { com . vmware . vrack . hms . common . switches . api . SwitchNode switchNode = getSwitchNode ( switchId ) ; com . vmware . vrack . hms . common . switches . api . ISwitchService switchService = getSwitchService ( switchId ) ; validate ( switchId , switchNode , switchService ) ; return switchService . getSwitchPortList ( switchNode ) ; }
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
equalsConsistentTest ( ) { System . out . print ( "-><sp>Consistent<sp>equals<sp>-<sp>" ) ; final ua . com . alexcoffee . model . photo . Photo photo1 = ua . com . alexcoffee . model . photo . Photo . getBuilder ( ) . build ( ) ; photo1 . setTitle ( "Photo" ) ; photo1 . setSmallUrl ( "link1" ) ; photo1 . setLongUrl ( "link2" ) ; final ua . com . alexcoffee . model . photo . Photo photo2 = ua . com . alexcoffee . model . photo . Photo . getBuilder ( ) . build ( ) ; photo2 . setTitle ( "Photo" ) ; photo2 . setSmallUrl ( "link1" ) ; photo2 . setLongUrl ( "link2" ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<AssertPlaceHolder>" ; } System . out . println ( "OK!" ) ; } equals ( java . lang . Object ) { boolean result = super . equals ( object ) ; if ( result ) { final ua . com . alexcoffee . model . photo . Photo photo = ( ( ua . com . alexcoffee . model . photo . Photo ) ( object ) ) ; result = ( ( this . title . equals ( photo . title ) ) && ( this . smallUrl . equals ( photo . smallUrl ) ) ) && ( this . longUrl . equals ( photo . longUrl ) ) ; } return result ; }
org . junit . Assert . assertTrue ( photo1 . equals ( photo2 ) )
testVergelijkDatumEindeGeldigheid1Leeg ( ) { final nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters maakBerichtParameters = new nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtParameters ( ) ; final nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtPersoonInformatie maakBerichtPersoon = new nl . bzk . brp . service . maakbericht . algemeen . MaakBerichtPersoonInformatie ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortSynchronisatie . VOLLEDIG_BERICHT ) ; final nl . bzk . brp . service . maakbericht . algemeen . Berichtgegevens berichtgegevens = new nl . bzk . brp . service . maakbericht . algemeen . Berichtgegevens ( maakBerichtParameters , new nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst ( nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . LEEG_PERSOON , 0L ) , maakBerichtPersoon , null , new nl . bzk . brp . service . maakbericht . bepaling . StatischePersoongegevens ( ) ) ; nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder groepBuilder = new nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder ( null ) ; groepBuilder . metGroepElement ( Element . PERSOON_ADRES_STANDAARD . getId ( ) ) ; final nl . bzk . brp . domain . leveringmodel . MetaGroep metaGroep = groepBuilder . build ( null ) ; nl . bzk . brp . domain . leveringmodel . Actie actieInhoud1 = nl . bzk . brp . domain . leveringmodel . TestVerantwoording . maakActie ( 1 , nl . bzk . brp . domain . leveringmodel . helper . TestDatumUtil . gisteren ( ) ) ; nl . bzk . brp . domain . leveringmodel . Actie actieVerval1 = nl . bzk . brp . domain . leveringmodel . TestVerantwoording . maakActie ( 1 , nl . bzk . brp . domain . leveringmodel . helper . TestDatumUtil . morgen ( ) ) ; nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder recordBuilder1 = new nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder ( groepBuilder ) ; recordBuilder1 . metActieInhoud ( actieInhoud1 ) ; recordBuilder1 . metActieVerval ( actieVerval1 ) ; recordBuilder1 . metDatumAanvangGeldigheid ( 20101010 ) ; final nl . bzk . brp . domain . leveringmodel . MetaRecord metaRecord1 = recordBuilder1 . build ( metaGroep ) ; nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder recordBuilder2 = new nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder ( groepBuilder ) ; recordBuilder2 . metActieInhoud ( actieInhoud1 ) ; recordBuilder2 . metActieVerval ( actieVerval1 ) ; recordBuilder2 . metDatumAanvangGeldigheid ( 20101010 ) ; recordBuilder2 . metDatumEindeGeldigheid ( 20111010 ) ; final nl . bzk . brp . domain . leveringmodel . MetaRecord metaRecord2 = recordBuilder2 . build ( metaGroep ) ; final java . util . Comparator < nl . bzk . brp . domain . leveringmodel . MetaRecord > metaRecordComparator = nl . bzk . brp . service . maakbericht . builders . BerichtRecordComparatorFactory . maakComparator ( berichtgegevens ) ; final int compare = metaRecordComparator . compare ( metaRecord1 , metaRecord2 ) ; "<AssertPlaceHolder>" ; } compare ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Document , nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Document ) { return ( berekenHash ( document1 ) ) - ( berekenHash ( document2 ) ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , compare )
testGetRolesWithEmptyAuthorities ( ) { java . util . List < java . lang . String > expected = java . util . Collections . emptyList ( ) ; java . util . Collection < org . springframework . security . core . GrantedAuthority > authorities = java . util . Collections . emptyList ( ) ; when ( context . getAuthentication ( ) ) . thenReturn ( authentification ) ; doReturn ( authorities ) . when ( authentification ) . getAuthorities ( ) ; java . util . List < java . lang . String > actual = unit . getRoles ( ) ; "<AssertPlaceHolder>" ; } getRoles ( ) { return roles ; }
org . junit . Assert . assertEquals ( expected , actual )
testFastIndexRecompute ( ) { final com . persistit . Buffer b1 = getABuffer ( ) ; try { b1 . init ( Buffer . PAGE_TYPE_DATA ) ; final com . persistit . Key key = new com . persistit . Key ( _persistit ) ; final com . persistit . Value value = new com . persistit . Value ( _persistit ) ; final com . persistit . ValueHelper . RawValueWriter vwriter = new com . persistit . ValueHelper . RawValueWriter ( ) ; final com . persistit . FastIndex fi = b1 . getFastIndex ( ) ; fi . recompute ( ) ; vwriter . init ( value ) ; fakeKey ( key , "A" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "ABC" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "B" 1 ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "ABZ" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "AC" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "B" 0 ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "B" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "B" 2 ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "D" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "DA" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "ABB" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "ABA" ) ; b1 . putValue ( key , vwriter ) ; fakeKey ( key , "ABJ" ) ; b1 . putValue ( key , vwriter ) ; final java . lang . String inserteds = fi . toString ( ) ; fi . recompute ( ) ; final java . lang . String computeds = fi . toString ( ) ; "<AssertPlaceHolder>" ; } finally { b1 . release ( ) ; } } toString ( ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( bufferSize ) . append ( "," ) ; if ( ( minimumCount ) == ( maximumCount ) ) { sb . append ( java . lang . String . format ( com . persistit . Configuration . BufferPoolConfiguration . SIMPLE_COUNT_FORMAT , minimumCount ) ) ; } else if ( ( ( minimumCount ) != 0 ) || ( ( maximumCount ) != ( Integer . MAX_VALUE ) ) ) { sb . append ( java . lang . String . format ( com . persistit . Configuration . BufferPoolConfiguration . MIN_MAX_COUNT_FORMAT , minimumCount , maximumCount ) ) ; } if ( ( ( ( ( minimumMemory ) != 0 ) || ( ( maximumMemory ) != ( Long . MAX_VALUE ) ) ) || ( ( reservedMemory ) != 0 ) ) || ( ( fraction ) != 1.0F ) ) { sb . append ( java . lang . String . format ( com . persistit . Configuration . BufferPoolConfiguration . MIN_MAX_MEMORY_FORMAT , com . persistit . Configuration . displayableLongValue ( minimumMemory ) , com . persistit . Configuration . displayableLongValue ( maximumMemory ) , com . persistit . Configuration . displayableLongValue ( reservedMemory ) , fraction ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( inserteds , computeds )
testReadWrite ( ) { org . nd4j . linalg . api . ndarray . INDArray write = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; org . nd4j . linalg . jcublas . buffer . ByteArrayOutputStream bos = new org . nd4j . linalg . jcublas . buffer . ByteArrayOutputStream ( ) ; org . nd4j . linalg . jcublas . buffer . DataOutputStream dos = new org . nd4j . linalg . jcublas . buffer . DataOutputStream ( bos ) ; org . nd4j . linalg . factory . Nd4j . write ( write , dos ) ; org . nd4j . linalg . jcublas . buffer . ByteArrayInputStream bis = new org . nd4j . linalg . jcublas . buffer . ByteArrayInputStream ( bos . toByteArray ( ) ) ; org . nd4j . linalg . jcublas . buffer . DataInputStream dis = new org . nd4j . linalg . jcublas . buffer . DataInputStream ( bis ) ; org . nd4j . linalg . api . ndarray . INDArray read = org . nd4j . linalg . factory . Nd4j . read ( dis ) ; "<AssertPlaceHolder>" ; } read ( org . nd4j . linalg . factory . InputStream ) { return org . nd4j . linalg . factory . Nd4j . read ( new org . nd4j . linalg . factory . DataInputStream ( reader ) ) ; }
org . junit . Assert . assertEquals ( write , read )
testGetUrl ( ) { System . out . println ( "getUrl" ) ; java . lang . String id = "" ; eu . impact_project . wsclient . ServiceProvider instance = new eu . impact_project . wsclient . ServiceProviderTest . ServiceProviderImpl ( ) ; java . net . URL expResult = null ; java . net . URL result = instance . getUrl ( id ) ; "<AssertPlaceHolder>" ; } getUrl ( java . lang . String ) { return urlMap . get ( id ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetReply ( ) { org . sagebionetworks . repo . model . discussion . Forum dto = servletTestHelper . getForumByProjectId ( dispatchServlet , project . getId ( ) , adminUserId ) ; createThread . setForumId ( dto . getId ( ) ) ; org . sagebionetworks . repo . model . discussion . DiscussionThreadBundle threadBundle = servletTestHelper . createThread ( dispatchServlet , adminUserId , createThread ) ; createReply . setThreadId ( threadBundle . getId ( ) ) ; org . sagebionetworks . repo . model . discussion . DiscussionReplyBundle replyBundle = servletTestHelper . createReply ( dispatchServlet , adminUserId , createReply ) ; "<AssertPlaceHolder>" ; } getReply ( org . springframework . web . servlet . DispatcherServlet , java . lang . Long , java . lang . String ) { org . springframework . mock . web . MockHttpServletRequest request = org . sagebionetworks . repo . web . controller . ServletTestHelperUtils . initRequest ( HTTPMODE . GET , "/repo/v1" , ( ( ( org . sagebionetworks . repo . web . UrlHelpers . REPLY ) + "/" ) + replyId ) , userId , null ) ; org . springframework . mock . web . MockHttpServletResponse response = org . sagebionetworks . repo . web . controller . ServletTestHelperUtils . dispatchRequest ( dispatchServlet , request , HttpStatus . OK ) ; return org . sagebionetworks . repo . web . controller . ServletTestHelper . objectMapper . readValue ( response . getContentAsString ( ) , org . sagebionetworks . repo . model . discussion . DiscussionReplyBundle . class ) ; }
org . junit . Assert . assertEquals ( replyBundle , servletTestHelper . getReply ( dispatchServlet , adminUserId , replyBundle . getId ( ) ) )
createStringShouldAllowNoParametersSupplied ( ) { "<AssertPlaceHolder>" ; } createString ( java . lang . String , java . lang . Object [ ] ) { org . modeshape . common . util . CheckArg . isNotNull ( pattern , "pattern" ) ; if ( parameters == null ) parameters = org . modeshape . common . util . StringUtil . EMPTY_STRING_ARRAY ; java . util . regex . Matcher matcher = org . modeshape . common . util . StringUtil . PARAMETER_COUNT_PATTERN . matcher ( pattern ) ; java . lang . StringBuffer text = new java . lang . StringBuffer ( ) ; int requiredParameterCount = 0 ; boolean err = false ; while ( matcher . find ( ) ) { int ndx = java . lang . Integer . valueOf ( matcher . group ( 1 ) ) ; if ( requiredParameterCount <= ndx ) { requiredParameterCount = ndx + 1 ; } if ( ndx >= ( parameters . length ) ) { err = true ; matcher . appendReplacement ( text , matcher . group ( ) ) ; } else { java . lang . Object parameter = parameters [ ndx ] ; if ( ( parameter != null ) && ( parameter . getClass ( ) . isArray ( ) ) ) { if ( parameter instanceof java . lang . Object [ ] ) { parameter = java . util . Arrays . asList ( ( ( java . lang . Object [ ] ) ( parameter ) ) ) ; } else { int length = java . lang . reflect . Array . getLength ( parameter ) ; java . util . List < java . lang . Object > parameterAsList = new java . util . ArrayList < java . lang . Object > ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { parameterAsList . add ( java . lang . reflect . Array . get ( parameter , i ) ) ; } parameter = parameterAsList ; } } matcher . appendReplacement ( text , java . util . regex . Matcher . quoteReplacement ( ( parameter == null ? "null" : parameter . toString ( ) ) ) ) ; } } if ( err || ( requiredParameterCount < ( parameters . length ) ) ) { throw new java . lang . IllegalArgumentException ( CommonI18n . requiredToSuppliedParameterMismatch . text ( parameters . length , ( ( parameters . length ) == 1 ? "" : "s" ) , requiredParameterCount , ( requiredParameterCount == 1 ? "" : "s" ) , pattern , text . toString ( ) ) ) ; } matcher . appendTail ( text ) ; return text . toString ( ) ; }
org . junit . Assert . assertThat ( org . modeshape . common . util . StringUtil . createString ( "test" , ( ( java . lang . Object [ ] ) ( null ) ) ) , org . hamcrest . core . Is . is ( "test" ) )
testComposition2 ( ) { com . github . davidmoten . rx . jdbc . DatabaseTestBase . log . debug ( "running<sp>testComposition2" ) ; rx . functions . Func1 < java . lang . Integer , java . lang . Boolean > isZero = new rx . functions . Func1 < java . lang . Integer , java . lang . Boolean > ( ) { @ com . github . davidmoten . rx . jdbc . Override public com . github . davidmoten . rx . jdbc . Boolean call ( java . lang . Integer count ) { return count == 0 ; } } ; com . github . davidmoten . rx . jdbc . Database db = db ( ) ; rx . Observable < java . lang . Integer > existingRows = db . select ( "select<sp>name<sp>from<sp>person<sp>where<sp>name=?" ) . parameter ( "FRED" ) . getAs ( java . lang . String . class ) . count ( ) . filter ( isZero ) ; java . util . List < java . lang . Integer > counts = db . update ( "insert<sp>into<sp>person(name,score)<sp>values(?,?)" ) . parameters ( existingRows ) . count ( ) . toList ( ) . toBlocking ( ) . single ( ) ; "<AssertPlaceHolder>" ; } count ( ) { return rx . Observable . create ( new rx . Observable . OnSubscribe < java . lang . Long > ( ) { @ com . github . davidmoten . rx . Override public void call ( rx . Subscriber < ? super java . lang . Long > subscriber ) { subscriber . onNext ( count . get ( ) ) ; subscriber . onCompleted ( ) ; } } ) ; }
org . junit . Assert . assertEquals ( 0 , counts . size ( ) )
testUpdatePrimaryIndexKeyOfResourceId ( ) { insertKeys ( getHive ( ) ) ; org . hivedb . meta . directory . Directory d = getDirectory ( ) ; java . lang . String firstKey = org . hivedb . util . functional . Atom . getFirst ( getPrimaryIndexOrResourceKeys ( ) ) ; for ( java . lang . String key : getPrimaryIndexOrResourceKeys ( ) ) { d . updatePrimaryIndexKeyOfResourceId ( resource , key , firstKey ) ; "<AssertPlaceHolder>" ; } } getPrimaryIndexKeyOfResourceId ( org . hivedb . meta . Resource , java . lang . Object ) { java . util . Collection keys = doRead ( sql . selectPrimaryIndexKeysOfResourceId ( resource ) , new java . lang . Object [ ] { id } , org . hivedb . util . database . RowMappers . newObjectRowMapper ( resource . getPartitionDimension ( ) . getColumnType ( ) ) ) ; if ( ( keys . size ( ) ) == 0 ) throw new org . hivedb . HiveKeyNotFoundException ( java . lang . String . format ( "Unable<sp>to<sp>find<sp>primary<sp>key<sp>for<sp>resource<sp>%s<sp>with<sp>id<sp>%s" , resource . getName ( ) , id ) , id ) ; else if ( ( keys . size ( ) ) > 1 ) throw new org . hivedb . DirectoryCorruptionException ( java . lang . String . format ( "Directory<sp>corruption:<sp>Resource<sp>%s<sp>with<sp>id<sp>%s<sp>is<sp>owned<sp>more<sp>than<sp>one<sp>primary<sp>key." , resource . getName ( ) , id ) ) ; return org . hivedb . util . functional . Atom . getFirstOrNull ( keys ) ; }
org . junit . Assert . assertEquals ( firstKey , d . getPrimaryIndexKeyOfResourceId ( resource , key ) . toString ( ) )
testIsInfoEnabled ( ) { org . apache . commons . logging . Log mockLog = mock ( org . apache . commons . logging . Log . class ) ; when ( mockLog . isInfoEnabled ( ) ) . thenReturn ( true ) ; io . netty . util . internal . logging . InternalLogger logger = new io . netty . util . internal . logging . CommonsLogger ( mockLog , "foo" ) ; "<AssertPlaceHolder>" ; verify ( mockLog ) . isInfoEnabled ( ) ; } isInfoEnabled ( ) { return logger . isInfoEnabled ( ) ; }
org . junit . Assert . assertTrue ( logger . isInfoEnabled ( ) )
testHaalPersoonCacheOp ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonCache cache = persoonCacheJpaRepository . haalPersoonCacheOp ( 1 ) ; "<AssertPlaceHolder>" ; } haalPersoonCacheOp ( java . lang . Integer ) { final java . util . List < nl . bzk . brp . model . operationeel . kern . PersoonCacheModel > persoonCaches = entityManager . createQuery ( ( "select<sp>persoonCache<sp>from<sp>PersoonCacheModel<sp>persoonCache<sp>where<sp>" + "persoonCache.persoonId<sp>=<sp>:persoonId" ) , nl . bzk . brp . model . operationeel . kern . PersoonCacheModel . class ) . setParameter ( "persoonId" , persoonId ) . getResultList ( ) ; if ( ! ( persoonCaches . isEmpty ( ) ) ) { return persoonCaches . get ( 0 ) ; } return null ; }
org . junit . Assert . assertNotNull ( cache )
testJUnitHamcrestMatcherFailureWorks ( ) { try { "<AssertPlaceHolder>" ; } catch ( java . lang . NoSuchMethodError e ) { org . junit . Assert . fail ( ( ( "Class<sp>search<sp>path<sp>seems<sp>broken<sp>re<sp>new<sp>JUnit<sp>and<sp>old<sp>Hamcrest." + "<sp>Got<sp>NoSuchMethodError;<sp>e:<sp>" ) + e ) ) ; } catch ( java . lang . AssertionError e ) { org . apache . drill . exec . test . Drill2130StorageHiveCoreHamcrestConfigurationTest . logger . info ( "Class<sp>path<sp>seems<sp>fine<sp>re<sp>new<sp>JUnit<sp>vs.<sp>old<sp>Hamcrest.<sp>(Got<sp>AssertionError,<sp>not<sp>NoSuchMethodError.)" ) ; } }
org . junit . Assert . assertThat ( 1 , org . hamcrest . CoreMatchers . equalTo ( 2 ) )
testBuildWithParametersAndDisabledDefaultCOnstaintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "AN" ; java . lang . String name = "fsdfds" ; org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . ContactType ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>ContactType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>)<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . contact . type . ContactType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testGetEntityManager ( ) { javax . persistence . EntityManager em = emf . createEntityManager ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( em )
extract_AddAfterUsageEndWithRole ( ) { createUsageLicenseHistory ( ModificationType . ADD , org . oscm . test . DateTimeHandling . calculateDate ( "2013-05-01<sp>00:00:01" ) , org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractorTest . USER_KEY , org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractorTest . USER_ID , java . lang . Long . valueOf ( org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractorTest . ROLE_KEY_1 ) ) ; org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractor extractor = new org . oscm . billingservice . business . calculation . revenue . UserAssignmentExtractor ( histories , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-01<sp>00:00:00" ) , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-05-01<sp>00:00:00" ) ) ; extractor . extract ( ) ; java . util . Set < java . lang . Long > userKeySet = extractor . getUserKeys ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , userKeySet . size ( ) )
encodeDecodeMapIp ( ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . net . InetAddress local = java . net . Inet4Address . getByAddress ( new byte [ ] { 127 , 0 , 0 , 1 } ) ; m . put ( "ip" , local ) ; java . nio . ByteBuffer bb = fastEncode ( m ) ; java . util . Map < java . lang . String , java . lang . Object > dm = org . krakenapps . codec . EncodingRule . decodeMap ( bb ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String [ ] ) { if ( ( depth ) == ( ( path . length ) - 1 ) ) { return itemMap . get ( path [ depth ] ) ; } else { if ( ! ( subnodeMap . containsKey ( path [ depth ] ) ) ) { return null ; } org . krakenapps . util . DirectoryMap . Node < T > sub = subnodeMap . get ( path [ depth ] ) ; return sub . get ( path ) ; } }
org . junit . Assert . assertEquals ( local , dm . get ( "ip" ) )
testAddBlock ( ) { org . ds . chronos . metrics . MetricStore store = new org . ds . chronos . metrics . MetricStore ( chronicle ) ; java . util . List < org . ds . chronos . metrics . Metric > metrics = new java . util . ArrayList < org . ds . chronos . metrics . Metric > ( ) ; for ( int i = 0 ; i < 128 ; i ++ ) { metrics . add ( new org . ds . chronos . metrics . Metric ( ( i * 1000 ) , 10.0F ) ) ; } store . add ( metrics ) ; "<AssertPlaceHolder>" ; } getNumEvents ( long , long ) { if ( items . isEmpty ( ) ) { return 0 ; } try { return items . subSet ( low ( t1 ) , true , high ( t2 ) , true ) . size ( ) ; } catch ( java . lang . Throwable t ) { return 0 ; } }
org . junit . Assert . assertEquals ( 128 , chronicle . getNumEvents ( 0 , java . lang . System . currentTimeMillis ( ) ) )
testCacheEntryWithVaryStarHasVariants ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Vary" , "*" ) } ; entry = makeEntry ( headers ) ; "<AssertPlaceHolder>" ; } hasVariants ( ) { return ( getFirstHeader ( HeaderConstants . VARY ) ) != null ; }
org . junit . Assert . assertTrue ( entry . hasVariants ( ) )
testCopyDynAny ( ) { java . lang . String msg ; java . math . BigDecimal fixedVal ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynFixed dynAny = null ; org . omg . DynamicAny . DynFixed dynAny2 = null ; fixedVal = new java . math . BigDecimal ( "1.0" ) ; tc = orb . create_fixed_tc ( ( ( short ) ( 2 ) ) , ( ( short ) ( 1 ) ) ) ; dynAny = createDynAnyFromTypeCode ( tc ) ; dynAny . set_value ( fixedVal . toString ( ) ) ; dynAny2 = ( ( org . omg . DynamicAny . DynFixed ) ( dynAny . copy ( ) ) ) ; msg = "The<sp>DynAny<sp>object<sp>created<sp>with<sp>the<sp>DynAny::copy<sp>operation<sp>" ; msg += "is<sp>not<sp>equal<sp>to<sp>the<sp>DynAny<sp>object<sp>it<sp>was<sp>copied<sp>from" ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) )