input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
isLinkFoundTrue ( ) { final java . lang . String linkName = "linkName" ; final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDeviceOperation amqpsSessionDeviceOperation = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDeviceOperation ( mockDeviceClientConfig , mockAmqpsDeviceAuthentication ) ; mockit . Deencapsulation . setField ( amqpsSessionDeviceOperation , "amqpsAuthenticatorState" , AmqpsDeviceAuthenticationState . AUTHENTICATED ) ; new mockit . NonStrictExpectations ( ) { { mockit . Deencapsulation . invoke ( mockAmqpsDeviceTelemetry , "isLinkFound" , linkName ) ; result = true ; } } ; java . lang . Boolean isFound = mockit . Deencapsulation . invoke ( amqpsSessionDeviceOperation , "isLinkFound" , linkName ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( isFound )
testGetMDCValue ( ) { org . terasoluna . gfw . security . web . logging . UserIdMDCPutFilter mdcPutFilter = new org . terasoluna . gfw . security . web . logging . UserIdMDCPutFilter ( ) ; java . lang . String userName = "terasoluna@nttd.co.jp" ; securityContext = mock ( org . springframework . security . core . context . SecurityContext . class ) ; authentication = mock ( org . springframework . security . core . Authentication . class ) ; user = new org . springframework . security . core . userdetails . User ( userName , "yyyy" , java . util . Arrays . asList ( new org . springframework . security . core . authority . SimpleGrantedAuthority ( "user" ) ) ) ; when ( authentication . getPrincipal ( ) ) . thenReturn ( user ) ; when ( securityContext . getAuthentication ( ) ) . thenReturn ( authentication ) ; org . springframework . security . core . context . SecurityContextHolder . setContext ( securityContext ) ; java . lang . String mdcValueStr = mdcPutFilter . getMDCValue ( request , response ) ; "<AssertPlaceHolder>" ; } getMDCValue ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) { org . springframework . security . core . Authentication authentication = org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; if ( authentication != null ) { java . lang . Object principal = authentication . getPrincipal ( ) ; if ( principal instanceof org . springframework . security . core . userdetails . UserDetails ) { return ( ( org . springframework . security . core . userdetails . UserDetails ) ( principal ) ) . getUsername ( ) ; } return principal . toString ( ) ; } return null ; }
org . junit . Assert . assertThat ( mdcValueStr , org . hamcrest . CoreMatchers . is ( userName ) )
testCAS ( ) { net . openhft . lang . io . Bytes bytes = net . openhft . lang . io . ByteBufferBytes . wrap ( java . nio . ByteBuffer . allocate ( 100 ) ) ; bytes . compareAndSwapLong ( 0 , 0L , 1L ) ; "<AssertPlaceHolder>" ; } readLong ( long ) { return getChronicleUnsafe ( ) . getLong ( ( ( start ) + offset ) ) ; }
org . junit . Assert . assertEquals ( 1L , bytes . readLong ( 0 ) )
size ( ) { int size = 100 ; byte [ ] bytes = new byte [ size ] ; random . nextBytes ( bytes ) ; java . lang . Object object = new java . lang . Object ( ) ; doReturn ( null ) . when ( pointerMap ) . get ( object ) ; doReturn ( pointer ) . when ( bufferStore ) . store ( bytes ) ; doReturn ( bytes ) . when ( serializer ) . serialize ( object ) ; doReturn ( null ) . when ( pointerMap ) . put ( object , pointer ) ; doReturn ( 1 ) . when ( pointerMap ) . size ( ) ; cache . put ( object , object ) ; verify ( pointerMap ) . put ( object , pointer ) ; "<AssertPlaceHolder>" ; verify ( pointerMap ) . size ( ) ; } size ( ) { int size = 100 ; byte [ ] bytes = new byte [ size ] ; random . nextBytes ( bytes ) ; java . lang . Object object = new java . lang . Object ( ) ; doReturn ( null ) . when ( pointerMap ) . get ( object ) ; doReturn ( pointer ) . when ( bufferStore ) . store ( bytes ) ; doReturn ( bytes ) . when ( serializer ) . serialize ( object ) ; doReturn ( null ) . when ( pointerMap ) . put ( object , pointer ) ; doReturn ( 1 ) . when ( pointerMap ) . size ( ) ; cache . put ( object , object ) ; verify ( pointerMap ) . put ( object , pointer ) ; org . junit . Assert . assertEquals ( 1 , cache . size ( ) ) ; verify ( pointerMap ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , cache . size ( ) )
testAddPageLabel ( ) { org . apache . fop . pdf . PDFDocument pdfDoc = mock ( org . apache . fop . pdf . PDFDocument . class ) ; org . apache . fop . pdf . PDFPageLabels pageLabels = new org . apache . fop . pdf . PDFPageLabels ( ) ; pageLabels . setDocument ( pdfDoc ) ; int index = 0 ; java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; expected . append ( "[" ) ; expected . append ( ( index + "<sp><<<sp>/S<sp>/r<sp>>>" ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" 0 ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 7 ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 6 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<<sp>/S<sp>/r<sp>>>" 2 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 3 ) ; pageLabels . addPageLabel ( ( index ++ ) , "2" ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" 9 ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 9 ) ; pageLabels . addPageLabel ( ( index ++ ) , "5" ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 0 ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" ) ; pageLabels . addPageLabel ( ( index ++ ) , "8" ) ; pageLabels . addPageLabel ( ( index ++ ) , "9" ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 5 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 1 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 8 ) ; pageLabels . addPageLabel ( ( index ++ ) , "B" ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<<sp>/S<sp>/r<sp>>>" 1 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 6 ) ; expected . append ( ( ( "7" 7 + index ) + "7" 4 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" 2 ) ; expected . append ( ( ( "7" 7 + index ) + "[" 0 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" 1 ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 2 ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 4 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<<sp>/S<sp>/r<sp>>>" 7 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 2 ) ; expected . append ( ( ( "7" 7 + index ) + "[" 4 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 3 ) ; expected . append ( ( ( "7" 7 + index ) + "7" 8 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 0 ) ; expected . append ( ( ( "7" 7 + index ) + "7" 5 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "7" 3 ) ; pageLabels . addPageLabel ( ( index ++ ) , "b" ) ; expected . append ( ( ( "7" 7 + index ) + "7" 6 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 9 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 3 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 4 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 5 ) ; expected . append ( ( ( "7" 7 + index ) + "<sp><<\n<sp>/P<sp>(00)\n<sp>/S<sp>/D\n<sp>/St<sp>9\n>>" 5 ) ) ; pageLabels . addPageLabel ( ( index ++ ) , "[" 1 ) ; pageLabels . addPageLabel ( ( index ++ ) , "<sp><<<sp>/S<sp>/r<sp>>>" 6 ) ; expected . append ( "[" 8 ) ; org . apache . fop . pdf . PDFNumsArray nums = pageLabels . getNums ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; nums . output ( baos ) ; "<AssertPlaceHolder>" ; baos . close ( ) ; } toString ( ) { return "XMLResourceBundle:<sp>" + ( getLocale ( ) ) ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , baos . toString ( ) )
testHttpAbsoluteOtherFile ( ) { java . lang . String baseUri = "http://schemas.opengis.net/gml/3.2.1/gml.xsd" ; java . lang . String location = "file:///C:/Test/gml/3.2.1/feature.xsd" ; java . lang . String expected = location ; eu . esdihumboldt . hale . io . xsd . reader . internal . HumboldtURIResolver resolver = new eu . esdihumboldt . hale . io . xsd . reader . internal . HumboldtURIResolver ( ) ; org . xml . sax . InputSource source = resolver . resolveEntity ( "ns" , location , baseUri ) ; "<AssertPlaceHolder>" ; } getSystemId ( ) { return systemId ; }
org . junit . Assert . assertEquals ( expected , source . getSystemId ( ) )
testCreateUser ( ) { final org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo user = org . feuyeux . jaxrs2 . atup . core . fake . CreateUser . buildUserInfo ( ) ; final javax . ws . rs . client . Entity < org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo > e = javax . ws . rs . client . Entity . entity ( user , MediaType . APPLICATION_JSON_TYPE ) ; final javax . ws . rs . core . Response response = target ( ) . path ( AtupApi . USER_PATH ) . request ( ) . post ( e ) ; final org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo result = response . readEntity ( org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo . class ) ; if ( ( result . getStatusCode ( ) ) == ( org . feuyeux . jaxrs2 . atup . core . info . AtupErrorCode . NONE ) ) { "<AssertPlaceHolder>" ; } else { org . junit . Assert . fail ( ) ; log . info ( result . getErrorInfo ( ) ) ; } } getUserName ( ) { return userName ; }
org . junit . Assert . assertEquals ( user . getUserName ( ) , result . getUserName ( ) )
shouldConvertNullToTypeValue ( ) { final uk . gov . gchq . gaffer . types . function . ToTypeValue function = new uk . gov . gchq . gaffer . types . function . ToTypeValue ( ) ; final java . lang . Object value = null ; final uk . gov . gchq . gaffer . types . TypeValue result = function . apply ( value ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { if ( null == value ) { return null ; } if ( value instanceof java . lang . Number ) { return ( ( java . lang . Number ) ( value ) ) . intValue ( ) ; } if ( value instanceof java . lang . String ) { return java . lang . Integer . valueOf ( ( ( java . lang . String ) ( value ) ) ) ; } throw new java . lang . IllegalArgumentException ( ( "Could<sp>not<sp>convert<sp>value<sp>to<sp>Integer:<sp>" + value ) ) ; }
org . junit . Assert . assertEquals ( new uk . gov . gchq . gaffer . types . TypeValue ( null , null ) , result )
testLeitorRequisicaoNull ( ) { try { new br . com . senacrs . alp . aulas . trabalho12 . LeitorRequisicao ( null ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( true )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . polls . model . PollsQuestion . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "questionId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "questionId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testGetCodeBlockSimpleEnum ( ) { setName ( cls , "MyEnum" ) ; setEnum ( cls , true ) ; java . lang . String expected = "" + ( ( "enum<sp>MyEnum<sp>{\n" + "\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } getCodeBlock ( ) { return getModelWriter ( ) . writeParameter ( this ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , cls . getCodeBlock ( ) )
givenStringEvent_whenEventHandled_thenSuccess ( ) { listener . resetEventsHandled ( ) ; eventBus . post ( "String<sp>Event" ) ; "<AssertPlaceHolder>" ; } getEventsHandled ( ) { return org . baeldung . guava . EventListener . eventsHandled ; }
org . junit . Assert . assertEquals ( 1 , listener . getEventsHandled ( ) )
canListBatchAIUsages ( ) { java . util . List < com . microsoft . azure . management . batchai . BatchAIUsage > usages = batchAIManager . usages ( ) . listByRegion ( Region . EUROPE_WEST ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; }
org . junit . Assert . assertTrue ( ( ( usages . size ( ) ) > 0 ) )
testReadChannelFail ( ) { java . lang . String blobName = "test-read-channel-blob-fail" ; com . google . cloud . storage . BlobInfo blob = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . it . ITStorageTest . BUCKET , blobName ) . build ( ) ; com . google . cloud . storage . Blob remoteBlob = com . google . cloud . storage . it . ITStorageTest . storage . create ( blob ) ; "<AssertPlaceHolder>" ; try ( com . google . cloud . ReadChannel reader = com . google . cloud . storage . it . ITStorageTest . storage . reader ( blob . getBlobId ( ) , Storage . BlobSourceOption . metagenerationMatch ( ( - 1L ) ) ) ) { reader . read ( java . nio . ByteBuffer . allocate ( 42 ) ) ; org . junit . Assert . fail ( "StorageException<sp>was<sp>expected" ) ; } catch ( com . google . cloud . storage . StorageException ex ) { } try ( com . google . cloud . ReadChannel reader = com . google . cloud . storage . it . ITStorageTest . storage . reader ( blob . getBlobId ( ) , Storage . BlobSourceOption . generationMatch ( ( - 1L ) ) ) ) { reader . read ( java . nio . ByteBuffer . allocate ( 42 ) ) ; org . junit . Assert . fail ( "StorageException<sp>was<sp>expected" ) ; } catch ( com . google . cloud . storage . StorageException ex ) { } com . google . cloud . storage . BlobId blobIdWrongGeneration = com . google . cloud . storage . BlobId . of ( com . google . cloud . storage . it . ITStorageTest . BUCKET , blobName , ( - 1L ) ) ; try ( com . google . cloud . ReadChannel reader = com . google . cloud . storage . it . ITStorageTest . storage . reader ( blobIdWrongGeneration , Storage . BlobSourceOption . generationMatch ( ) ) ) { reader . read ( java . nio . ByteBuffer . allocate ( 42 ) ) ; org . junit . Assert . fail ( "StorageException<sp>was<sp>expected" ) ; } catch ( com . google . cloud . storage . StorageException ex ) { } } create ( com . google . cloud . storage . Acl ) { return new com . google . cloud . storage . contrib . nio . AutoValue_OptionAcl ( acl ) ; }
org . junit . Assert . assertNotNull ( remoteBlob )
getResolvedRelativeResourceURI ( ) { final org . obeonetwork . m2doc . genconf . Generation generation = GenconfPackage . eINSTANCE . getGenconfFactory ( ) . createGeneration ( ) ; final org . eclipse . emf . ecore . resource . Resource resource = new org . eclipse . emf . ecore . resource . impl . ResourceImpl ( org . eclipse . emf . common . util . URI . createURI ( "test/test.genconf" ) ) ; resource . getContents ( ) . add ( generation ) ; final org . eclipse . emf . common . util . URI uri = org . obeonetwork . m2doc . genconf . GenconfUtils . getResolvedURI ( generation , org . eclipse . emf . common . util . URI . createURI ( "test" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( eIsProxy ( ) ) return super . toString ( ) ; java . lang . StringBuffer result = new java . lang . StringBuffer ( super . toString ( ) ) ; result . append ( "<sp>(name:<sp>" ) ; result . append ( name ) ; result . append ( ')' ) ; return result . toString ( ) ; }
org . junit . Assert . assertEquals ( "test" , uri . toString ( ) )
testEvaluateEmptyDasharray ( ) { org . geotools . filter . function . FilterFunction_listMultiply func = ( ( org . geotools . filter . function . FilterFunction_listMultiply ) ( ff . function ( "listMultiply" , ff . literal ( 2.5 ) , ff . literal ( "" ) ) ) ) ; java . lang . Object evaluate = func . evaluate ( null ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return evaluate ( object , org . locationtech . jts . geom . Point . class ) ; }
org . junit . Assert . assertNull ( evaluate )
testEqualsSuper ( ) { org . o3project . odenos . core . component . network . flow . basic . FlowActionOutput obj = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . flow . basic . FlowActionOutput ( ) ) ; when ( obj . getType ( ) ) . thenReturn ( "aaa" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
org . junit . Assert . assertThat ( target . equals ( obj ) , org . hamcrest . CoreMatchers . is ( false ) )
shouldSaveEntities ( ) { org . hivedb . hibernate . simplified . DataAccessObject < org . hivedb . util . database . test . WeatherReport , java . lang . Integer > dao = new org . hivedb . hibernate . simplified . ErrorCorrectingDataAccessObject < org . hivedb . util . database . test . WeatherReport , java . lang . Integer > ( org . hivedb . util . database . test . WeatherReport . class , getEntityHiveConfig ( ) . getEntityConfig ( org . hivedb . util . database . test . WeatherReport . class ) , getHive ( ) , getSessionFactory ( ) ) ; org . hivedb . util . database . test . WeatherReport original = org . hivedb . util . database . test . WeatherReportImpl . generate ( ) ; dao . save ( original ) ; org . hivedb . util . database . test . WeatherReport fetched = dao . get ( original . getReportId ( ) ) ; "<AssertPlaceHolder>" ; } getReportId ( ) { return reportId ; }
org . junit . Assert . assertEquals ( original , fetched )
testPreviousValueBeforeStart ( ) { org . roaringbitmap . buffer . MappeableContainer container = new org . roaringbitmap . buffer . MappeableArrayContainer ( java . nio . ShortBuffer . wrap ( new short [ ] { 10 , 20 , 30 } ) , 3 ) ; "<AssertPlaceHolder>" ; } previousValue ( int ) { short key = highbits ( fromValue ) ; int containerIndex = highLowContainer . advanceUntil ( key , ( - 1 ) ) ; long prevSetBit = - 1L ; while ( ( ( containerIndex != ( - 1 ) ) && ( containerIndex < ( highLowContainer . size ( ) ) ) ) && ( prevSetBit == ( - 1L ) ) ) { short containerKey = highLowContainer . getKeyAtIndex ( containerIndex ) ; org . roaringbitmap . buffer . MappeableContainer container = highLowContainer . getContainerAtIndex ( containerIndex ) ; int bit = ( ( org . roaringbitmap . buffer . Util . compareUnsigned ( containerKey , key ) ) < 0 ) ? container . last ( ) : container . previousValue ( lowbits ( fromValue ) ) ; prevSetBit = ( bit == ( - 1 ) ) ? - 1L : org . roaringbitmap . Util . toUnsignedLong ( ( ( containerKey << 16 ) | bit ) ) ; -- containerIndex ; } assert prevSetBit <= 4294967295L ; assert prevSetBit <= ( org . roaringbitmap . Util . toUnsignedLong ( fromValue ) ) ; return prevSetBit ; }
org . junit . Assert . assertEquals ( ( - 1 ) , container . previousValue ( ( ( short ) ( 5 ) ) ) )
testJitComparableNoGeneric ( ) { java . lang . String str = ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . compiler . integrationtests . Misc2Test . ComparableInteger . class . getCanonicalName ( ) ) ) + "\n" ) + "\n" ) + "rule<sp>\"minCost\"\n" ) + "when\n" ) + "<sp>$a<sp>:<sp>ComparableInteger()\n" ) + "<sp>ComparableInteger(<sp>this<sp><<sp>$a<sp>)\n" ) + "then\n" ) + "end" ; org . kie . api . KieBase kbase = loadKnowledgeBaseFromString ( str ) ; org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; ksession . insert ( new org . drools . compiler . integrationtests . Misc2Test . ComparableInteger ( 2 ) ) ; ksession . insert ( new org . drools . compiler . integrationtests . Misc2Test . ComparableInteger ( 3 ) ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
deveObterIEUnicaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setInscricaoEstadualUnica ( "654321" ) ; "<AssertPlaceHolder>" ; } getInscricaoEstadualUnica ( ) { return this . inscricaoEstadualUnica ; }
org . junit . Assert . assertEquals ( "654321" , retorno . getInscricaoEstadualUnica ( ) )
testComment2 ( ) { javax . xml . stream . XMLEventReader reader = createXmlEventReader ( "<!--james-->" , new org . apache . synapse . commons . staxon . core . event . SimpleXMLFilteredEventReaderTest . TypeFilter ( javax . xml . stream . XMLStreamConstants . COMMENT ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return ( index ) != ( tail ) ; }
org . junit . Assert . assertFalse ( reader . hasNext ( ) )
getProcessDefinitionIdsByActivationState ( ) { final java . util . List < java . lang . Long > processDefinitionIds = java . util . Arrays . asList ( 3L ) ; doReturn ( processDefinitionIds ) . when ( persistenceService ) . selectList ( org . mockito . Matchers . < org . bonitasoft . engine . persistence . SelectListDescriptor < java . lang . Long > > any ( ) ) ; final java . util . List < java . lang . Long > result = processDefinitionServiceImpl . getProcessDefinitionIds ( ActivationState . DISABLED , 0 , 10 ) ; "<AssertPlaceHolder>" ; } getProcessDefinitionIds ( org . bonitasoft . engine . bpm . process . ActivationState , int , int ) { final java . util . Map < java . lang . String , java . lang . Object > parameters = java . util . Collections . singletonMap ( "activationState" , ( ( java . lang . Object ) ( activationState . name ( ) ) ) ) ; final java . util . List < org . bonitasoft . engine . persistence . OrderByOption > orderByOptions = java . util . Collections . singletonList ( new org . bonitasoft . engine . persistence . OrderByOption ( org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo . class , "id" , org . bonitasoft . engine . persistence . OrderByType . ASC ) ) ; final org . bonitasoft . engine . persistence . SelectListDescriptor < java . lang . Long > selectDescriptor = new org . bonitasoft . engine . persistence . SelectListDescriptor ( "getProcessDefinitionsIdsInActivationState" , parameters , org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo . class , new org . bonitasoft . engine . persistence . QueryOptions ( fromIndex , numberOfResults , orderByOptions ) ) ; return persistenceService . selectList ( selectDescriptor ) ; }
org . junit . Assert . assertEquals ( processDefinitionIds , result )
equals_null ( ) { final net . sf . qualitycheck . immutableobject . domain . Import a = net . sf . qualitycheck . immutableobject . domain . Import . of ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final net . sf . qualitycheck . ConditionalCheckTest . NotEqual other = ( ( net . sf . qualitycheck . ConditionalCheckTest . NotEqual ) ( obj ) ) ; if ( ( value ) != ( other . value ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( a . equals ( null ) )
testAbsolutePathForJavaFile ( ) { openwhisk . java . local . Launcher launcher = new openwhisk . java . local . Launcher ( ) ; java . nio . file . Path filePath = java . nio . file . Paths . get ( "./src/test/resources/aproject/App.java" ) ; launcher . setBinaryPath ( filePath . toRealPath ( ) ) ; com . google . gson . JsonObject result = launcher . launch ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( result )
testToString ( ) { org . eclipse . rap . rwt . internal . theme . CssShadow shadow = org . eclipse . rap . rwt . internal . theme . CssShadow . create ( false , 10 , 10 , 0 , 0 , CssColor . BLACK ) ; java . lang . String expected = "CssShadow{<sp>false,<sp>10,<sp>10,<sp>0,<sp>0,<sp>#000000,<sp>1.0<sp>}" ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuffer buf = new java . lang . StringBuffer ( "CheatSheetCollection,<sp>" ) ; buf . append ( childCollections . size ( ) ) ; buf . append ( "<sp>children,<sp>" ) ; buf . append ( cheatsheets . size ( ) ) ; buf . append ( "<sp>cheatsheets" ) ; return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , shadow . toString ( ) )
available_onClosedStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org . exist . util . io . CachingFilterInputStream ( getNewCache ( is ) ) ; cfis . close ( ) ; "<AssertPlaceHolder>" ; } available ( ) { return bis . available ( ) ; }
org . junit . Assert . assertEquals ( 0 , cfis . available ( ) )
testGetInitId ( ) { System . out . println ( "testGetInitMessageId" ) ; gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord instance = new gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord ( ) ; java . lang . Long result = instance . getId ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNull ( result )
testAbstractMethodWithParametersAndReturnOnClassNoErrors_withAllowAbstractClassesEnabled ( ) { java . lang . String [ ] imports = new java . lang . String [ ] { } ; java . lang . String [ ] declarations = new java . lang . String [ ] { } ; java . lang . String [ ] testCode = new java . lang . String [ ] { } ; java . lang . String [ ] extra = new java . lang . String [ ] { "abstract<sp>class<sp>A<sp>{" , "public<sp>abstract<sp>function<sp>a(arg0:String,<sp>arg1:Number):Boolean;" , "}" } ; java . lang . String source = getAS ( imports , declarations , testCode , extra ) ; java . lang . String [ ] options = new java . lang . String [ ] { "-allow-abstract-classes=true" } ; java . io . File tempASFile = generateTempFile ( source ) ; java . lang . String result = compile ( tempASFile , source , false , false , false , options , true ) ; "<AssertPlaceHolder>" ; } compile ( java . io . File , java . lang . String , boolean , boolean , boolean , java . lang . String [ ] , boolean ) { System . out . println ( "Generating<sp>test:" ) ; as . ITestAdapter testAdapter = as . TestAdapterFactory . getTestAdapter ( ) ; java . util . List < java . lang . String > swcs = new java . util . ArrayList < java . lang . String > ( ) ; if ( withFramework ) { swcs . add ( testAdapter . getFlexArtifact ( "framework" ) . getPath ( ) ) ; swcs . add ( testAdapter . getFlexArtifactResourceBundle ( "framework" ) . getPath ( ) ) ; } if ( withRPC ) { swcs . add ( testAdapter . getFlexArtifact ( "spark" 5 ) . getPath ( ) ) ; swcs . add ( testAdapter . getFlexArtifactResourceBundle ( "spark" 5 ) . getPath ( ) ) ; } if ( withSpark ) { swcs . add ( testAdapter . getFlexArtifact ( "spark" ) . getPath ( ) ) ; swcs . add ( testAdapter . getFlexArtifactResourceBundle ( "spark" ) . getPath ( ) ) ; } java . util . List < java . lang . String > args = new java . util . ArrayList < java . lang . String > ( ) ; if ( hasFlashPlayerGlobal ) args . add ( ( "-external-library-path=" + ( testAdapter . getPlayerglobal ( ) . getPath ( ) ) ) ) ; else { java . lang . String jsSwcPath = as . FilenameNormalization . normalize ( "spark" 1 ) ; args . add ( ( "-external-library-path=" + jsSwcPath ) ) ; } if ( ( swcs . size ( ) ) > 0 ) { java . lang . String libraryPath = "-library-path=" + ( as . StringUtils . join ( swcs . toArray ( new java . lang . String [ swcs . size ( ) ] ) , "spark" 4 ) ) ; args . add ( libraryPath ) ; } if ( ( withFramework || withRPC ) || withSpark ) args . add ( ( ( ( "-namespace=" + ( as . ASFeatureTestsBase . NAMESPACE_2009 ) ) + "spark" 4 ) + ( testAdapter . getFlexManifestPath ( "spark" 2 ) ) ) ) ; if ( otherOptions != null ) { java . util . Collections . addAll ( args , otherOptions ) ; } args . add ( tempASFile . getAbsolutePath ( ) ) ; org . apache . royale . compiler . clients . MXMLC mxmlc = new org . apache . royale . compiler . clients . MXMLC ( ) ; java . lang . StringBuffer cmdLine = new java . lang . StringBuffer ( ) ; for ( java . lang . String arg : args ) { cmdLine . append ( arg ) . append ( "<sp>" ) ; } System . out . println ( ( "Compiling<sp>test:\n" + ( cmdLine . toString ( ) ) ) ) ; int exitCode = mxmlc . mainNoExit ( args . toArray ( new java . lang . String [ args . size ( ) ] ) ) ; java . util . List < org . apache . royale . compiler . problems . ICompilerProblem > problems = mxmlc . getProblems ( ) . getProblems ( ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ( checkExitCode && ( ( problems . size ( ) ) > 0 ) ? "Unexpected<sp>compilation<sp>problems:\n" : "spark" 0 ) ) ; for ( org . apache . royale . compiler . problems . ICompilerProblem problem : problems ) { sb . append ( problem . toString ( ) ) ; sb . append ( '\n' ) ; } System . out . println ( ( "spark" 3 + ( sb . toString ( ) ) ) ) ; if ( checkExitCode ) org . junit . Assert . assertThat ( sb . toString ( ) , exitCode , org . hamcrest . core . Is . is ( 0 ) ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , result )
testUpdateClustersToggleKerberos_Fail ( ) { org . easymock . Capture < org . apache . ambari . server . controller . AmbariManagementController > controllerCapture = org . easymock . EasyMock . newCapture ( ) ; com . google . inject . Injector injector = createStrictMock ( com . google . inject . Injector . class ) ; org . apache . ambari . server . state . Cluster cluster = createMock ( org . apache . ambari . server . state . Cluster . class ) ; org . apache . ambari . server . actionmanager . ActionManager actionManager = createNiceMock ( org . apache . ambari . server . actionmanager . ActionManager . class ) ; org . apache . ambari . server . controller . ClusterRequest clusterRequest = createNiceMock ( org . apache . ambari . server . controller . ClusterRequest . class ) ; java . util . Set < org . apache . ambari . server . controller . ClusterRequest > setRequests = java . util . Collections . singleton ( clusterRequest ) ; org . apache . ambari . server . controller . KerberosHelper kerberosHelper = createStrictMock ( org . apache . ambari . server . controller . KerberosHelper . class ) ; com . google . inject . Provider < org . apache . ambari . server . agent . stomp . MetadataHolder > m_metadataHolder = createMock ( com . google . inject . Provider . class ) ; org . apache . ambari . server . agent . stomp . MetadataHolder metadataHolder = createMock ( org . apache . ambari . server . agent . stomp . MetadataHolder . class ) ; com . google . inject . Provider < org . apache . ambari . server . agent . stomp . AgentConfigsHolder > m_agentConfigsHolder = createMock ( com . google . inject . Provider . class ) ; org . apache . ambari . server . agent . stomp . AgentConfigsHolder agentConfigsHolder = createMockBuilder ( org . apache . ambari . server . agent . stomp . AgentConfigsHolder . class ) . addMockedMethod ( "updateData" ) . createMock ( ) ; org . apache . ambari . server . controller . AmbariManagementControllerImplTest . constructorInit ( injector , controllerCapture , null , null , kerberosHelper , m_metadataHolder , m_agentConfigsHolder ) ; expect ( clusterRequest . getClusterId ( ) ) . andReturn ( 1L ) . times ( 4 ) ; expect ( clusterRequest . getSecurityType ( ) ) . andReturn ( SecurityType . NONE ) . anyTimes ( ) ; expect ( org . apache . ambari . server . controller . AmbariManagementControllerImplTest . clusters . getClusterById ( 1L ) ) . andReturn ( cluster ) . times ( 1 ) ; expect ( cluster . getResourceId ( ) ) . andReturn ( 1L ) . times ( 3 ) ; expect ( cluster . getSecurityType ( ) ) . andReturn ( SecurityType . KERBEROS ) . anyTimes ( ) ; expect ( cluster . getCurrentStackVersion ( ) ) . andReturn ( null ) . anyTimes ( ) ; expect ( cluster . getDesiredStackVersion ( ) ) . andReturn ( null ) . anyTimes ( ) ; cluster . setCurrentStackVersion ( anyObject ( org . apache . ambari . server . state . StackId . class ) ) ; expectLastCall ( ) . once ( ) ; expect ( kerberosHelper . shouldExecuteCustomOperations ( SecurityType . NONE , null ) ) . andReturn ( false ) . once ( ) ; expect ( kerberosHelper . getForceToggleKerberosDirective ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( false ) . once ( ) ; expect ( kerberosHelper . getManageIdentitiesDirective ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( null ) . once ( ) ; expect ( kerberosHelper . toggleKerberos ( anyObject ( org . apache . ambari . server . state . Cluster . class ) , anyObject ( org . apache . ambari . server . state . SecurityType . class ) , anyObject ( org . apache . ambari . server . controller . internal . RequestStageContainer . class ) , anyBoolean ( ) ) ) . andThrow ( new java . lang . IllegalArgumentException ( "bad<sp>args!" ) ) . once ( ) ; replay ( actionManager , cluster , org . apache . ambari . server . controller . AmbariManagementControllerImplTest . clusters , injector , clusterRequest , org . apache . ambari . server . controller . AmbariManagementControllerImplTest . sessionManager , kerberosHelper , m_agentConfigsHolder , agentConfigsHolder , m_metadataHolder , metadataHolder ) ; org . apache . ambari . server . controller . AmbariManagementController controller = partialMockBuilder ( org . apache . ambari . server . controller . AmbariManagementControllerImpl . class ) . withConstructor ( actionManager , org . apache . ambari . server . controller . AmbariManagementControllerImplTest . clusters , injector ) . addMockedMethod ( "getClusterMetadataOnConfigsUpdate" ) . createMock ( ) ; try { controller . updateClusters ( setRequests , null ) ; junit . framework . Assert . fail ( "IllegalArgumentException<sp>not<sp>thrown" ) ; } catch ( java . lang . IllegalArgumentException e ) { } "<AssertPlaceHolder>" ; verify ( actionManager , cluster , org . apache . ambari . server . controller . AmbariManagementControllerImplTest . clusters , injector , clusterRequest , org . apache . ambari . server . controller . AmbariManagementControllerImplTest . sessionManager , kerberosHelper , m_agentConfigsHolder , agentConfigsHolder , m_metadataHolder , metadataHolder ) ; } getValue ( ) { java . lang . Object o = ( ( delegate ) == null ) ? null : delegate . getValue ( ) ; return o == null ? null : o . toString ( ) ; }
org . junit . Assert . assertSame ( controller , controllerCapture . getValue ( ) )
testSetMessageReturnsDialog ( ) { com . eclipsesource . tabris . widgets . ClientDialog dialog = new com . eclipsesource . tabris . widgets . ClientDialog ( ) ; com . eclipsesource . tabris . widgets . ClientDialog actualDialog = dialog . setMessage ( "bar" ) ; "<AssertPlaceHolder>" ; } setMessage ( java . lang . String ) { whenNull ( message ) . throwIllegalArgument ( "message<sp>must<sp>not<sp>be<sp>null" ) ; this . message = message ; this . remoteObject . set ( com . eclipsesource . tabris . widgets . PROPERTY_MESSAGE , message ) ; return this ; }
org . junit . Assert . assertSame ( dialog , actualDialog )
getEncounters_shouldNotWork_WithPartialIdentifier ( ) { java . util . List < org . openmrs . Encounter > encountersByPartialIdentifier = dao . getEncounters ( "123" , null , null , null , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , encountersByPartialIdentifier . size ( ) )
testRowAccess_2x4 ( ) { org . la4j . matrix . Matrix a = m ( org . la4j . matrix . MatrixTest . a ( 1.0 , 0.0 , 4.0 , 0.0 ) , org . la4j . matrix . MatrixTest . a ( 0.0 , 5.0 , 0.0 , 7.0 ) ) ; org . la4j . matrix . Matrix b = m ( org . la4j . matrix . MatrixTest . a ( 1.0 , 0.0 , 4.0 , 0.0 ) , org . la4j . matrix . MatrixTest . a ( 1.0 , 0.0 , 4.0 , 0.0 ) ) ; a . setRow ( 1 , a . getRow ( 0 ) ) ; "<AssertPlaceHolder>" ; } getRow ( int ) { double [ ] result = new double [ columns ] ; java . lang . System . arraycopy ( self [ i ] , 0 , result , 0 , columns ) ; return new org . la4j . vector . dense . BasicVector ( result ) ; }
org . junit . Assert . assertEquals ( b , a )
evaluateGeneralRegressionAudit ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "GeneralRegression" , "Audit" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) )
test_GET_user_ok ( ) { org . apache . usergrid . rest . applications . collection . users . Collection users = usersResource . get ( ) ; java . lang . String uuid = users . getResponse ( ) . getEntities ( ) . get ( 0 ) . getUuid ( ) . toString ( ) ; java . lang . String email = users . getResponse ( ) . getEntities ( ) . get ( 0 ) . get ( "email" ) . toString ( ) ; org . apache . usergrid . rest . applications . collection . users . Entity user = usersResource . entity ( uuid ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { if ( id == null ) { return null ; } switch ( id ) { case 0 : return org . apache . usergrid . chop . runner . drivers . State . READY ; case 1 : return org . apache . usergrid . chop . runner . drivers . State . RUNNING ; case 2 : return org . apache . usergrid . chop . runner . drivers . State . STOPPED ; case 3 : return org . apache . usergrid . chop . runner . drivers . State . COMPLETED ; } throw new java . lang . RuntimeException ( "Should<sp>never<sp>get<sp>here!" ) ; }
org . junit . Assert . assertEquals ( email , user . get ( "email" ) . toString ( ) )
testGetPort_Null ( ) { com . englishtown . vertx . cassandra . impl . JsonCassandraConfigurator configurator = new com . englishtown . vertx . cassandra . impl . JsonCassandraConfigurator ( vertx ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return port ; }
org . junit . Assert . assertNull ( configurator . getPort ( ) )
build_response_with_link_account_card ( ) { com . amazon . ask . model . Response response = com . amazon . ask . model . Response . builder ( ) . withCard ( com . amazon . ask . model . ui . LinkAccountCard . builder ( ) . build ( ) ) . build ( ) ; java . util . Optional < com . amazon . ask . model . Response > responseWithBuilder = builder . withLinkAccountCard ( ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { com . amazon . ask . attributes . persistence . impl . DynamoDbPersistenceAdapter persistenceAdapter = null ; if ( ( tableName ) != null ) { com . amazon . ask . attributes . persistence . impl . DynamoDbPersistenceAdapter . Builder persistenceAdapterBuilder = com . amazon . ask . attributes . persistence . impl . DynamoDbPersistenceAdapter . builder ( ) . withTableName ( tableName ) ; if ( ( autoCreateTable ) != null ) { persistenceAdapterBuilder . withAutoCreateTable ( autoCreateTable ) ; } if ( ( partitionKeyGenerator ) != null ) { persistenceAdapterBuilder . withPartitionKeyGenerator ( partitionKeyGenerator ) ; } if ( ( customDynamoDBClient ) != null ) { persistenceAdapterBuilder . withDynamoDbClient ( customDynamoDBClient ) ; } persistenceAdapter = persistenceAdapterBuilder . build ( ) ; } com . amazon . ask . services . ApacheHttpApiClient apiClient = com . amazon . ask . services . ApacheHttpApiClient . custom ( ) . withHttpClient ( ( ( customHttpClient ) != null ? customHttpClient : org . apache . http . impl . client . HttpClients . createDefault ( ) ) ) . build ( ) ; return new com . amazon . ask . module . StandardSdkModule ( apiClient , persistenceAdapter ) ; }
org . junit . Assert . assertEquals ( responseWithBuilder . get ( ) , response )
testNullParameters ( ) { java . lang . String $ref = "#/components/parameters/Pet" ; org . eclipse . microprofile . openapi . models . Components component = model . getComponents ( ) ; component . setParameters ( null ) ; model . setComponents ( component ) ; context = new com . ibm . ws . microprofile . openapi . test . utils . TestValidationContextHelper ( model ) ; validator . validate ( vh , context , key , $ref ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , vh . getEventsSize ( ) )
testAppendParametersToQueryString_1 ( ) { java . lang . String url = "" ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap ( ) ; java . lang . String result = org . jinstagram . http . URLUtils . appendParametersToQueryString ( url , params ) ; "<AssertPlaceHolder>" ; } appendParametersToQueryString ( java . lang . String , java . util . Map ) { org . jinstagram . utils . Preconditions . checkNotNull ( url , "Cannot<sp>append<sp>to<sp>null<sp>URL" ) ; java . lang . String queryString = org . jinstagram . http . URLUtils . formURLEncodeMap ( params ) ; if ( queryString . equals ( org . jinstagram . http . URLUtils . EMPTY_STRING ) ) { return url ; } else { url += ( ( url . indexOf ( org . jinstagram . http . URLUtils . QUERY_STRING_SEPARATOR ) ) != ( - 1 ) ) ? org . jinstagram . http . URLUtils . PARAM_SEPARATOR : org . jinstagram . http . URLUtils . QUERY_STRING_SEPARATOR ; url += queryString ; return url ; } }
org . junit . Assert . assertEquals ( "" , result )
testCase101 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase101 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) )
query_by_special_char ( ) { dao . update ( dao . fetch ( org . nutz . dao . test . meta . Pet . class ) . setName ( "a@b" ) ) ; java . util . List < org . nutz . dao . test . meta . Pet > pets = dao . query ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "name" , "=" , "a@b" ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . keys ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , pets . size ( ) )
testSchedulingRequestDisabledByDefault ( ) { org . apache . hadoop . conf . Configuration csConf = org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . TestUtils . getConfigurationWithMultipleQueues ( new org . apache . hadoop . conf . Configuration ( ) ) ; org . apache . hadoop . yarn . server . resourcemanager . MockRM rm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockRM ( csConf ) { @ org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . Override public org . apache . hadoop . yarn . server . resourcemanager . nodelabels . RMNodeLabelsManager createNodeLabelManager ( ) { return mgr ; } } ; rm1 . getRMContext ( ) . setNodeLabelManager ( mgr ) ; rm1 . start ( ) ; org . apache . hadoop . yarn . server . resourcemanager . MockNM [ ] nms = new org . apache . hadoop . yarn . server . resourcemanager . MockNM [ 4 ] ; org . apache . hadoop . yarn . server . resourcemanager . rmnode . RMNode [ ] rmNodes = new org . apache . hadoop . yarn . server . resourcemanager . rmnode . RMNode [ 4 ] ; for ( int i = 0 ; i < 4 ; i ++ ) { nms [ i ] = rm1 . registerNode ( ( ( "192.168.0." + i ) + ":1234" ) , ( 10 * ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . TestSchedulingRequestContainerAllocation . GB ) ) ) ; rmNodes [ i ] = rm1 . getRMContext ( ) . getRMNodes ( ) . get ( nms [ i ] . getNodeId ( ) ) ; } org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp app1 = rm1 . submitApp ( ( 1 * ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . TestSchedulingRequestContainerAllocation . GB ) ) , "app" , "user" , null , "c" ) ; org . apache . hadoop . yarn . server . resourcemanager . MockAM am1 = org . apache . hadoop . yarn . server . resourcemanager . MockRM . launchAndRegisterAM ( app1 , rm1 , nms [ 0 ] ) ; boolean caughtException = false ; try { am1 . allocateIntraAppAntiAffinity ( org . apache . hadoop . yarn . api . records . ResourceSizing . newInstance ( 2 , org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) ) , org . apache . hadoop . yarn . api . records . Priority . newInstance ( 1 ) , 1L , com . google . common . collect . ImmutableSet . of ( "tag_1_1" , "tag_1_2" ) , "tag_1_1" , "tag_1_2" ) ; } catch ( java . lang . Exception e ) { caughtException = true ; } "<AssertPlaceHolder>" ; rm1 . close ( ) ; } of ( int , int ) { return new org . apache . hadoop . util . bloom . BloomFilterCommonTester < T > ( hashId , numInsertions ) ; }
org . junit . Assert . assertTrue ( caughtException )
storesLowerCaseIdentifiersShouldBeReturnFalse ( ) { org . neo4j . jdbc . Neo4jDatabaseMetaData databaseMetaData = mock ( org . neo4j . jdbc . Neo4jDatabaseMetaData . class , withSettings ( ) . defaultAnswer ( Mockito . CALLS_REAL_METHODS ) ) ; "<AssertPlaceHolder>" ; } storesLowerCaseIdentifiers ( ) { return false ; }
org . junit . Assert . assertFalse ( databaseMetaData . storesLowerCaseIdentifiers ( ) )
getValueFromJsonString_good_case ( ) { 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 = "generationId" ; javax . json . JsonString jsonStringObject = jsonObject . getJsonString ( key ) ; java . lang . String expResult = "111111111111111111" ; java . lang . String result = com . microsoft . azure . sdk . iot . service . Tools . getValueFromJsonString ( jsonStringObject ) ; "<AssertPlaceHolder>" ; } getValueFromJsonString ( javax . json . JsonString ) { java . lang . String retVal ; if ( jsonString == null ) { retVal = "" ; } else { retVal = jsonString . toString ( ) ; if ( retVal . startsWith ( "\"" ) ) { retVal = retVal . replaceFirst ( "\"" , "" ) ; } if ( retVal . endsWith ( "\"" ) ) { retVal = retVal . substring ( 0 , ( ( retVal . length ( ) ) - 1 ) ) ; } } return retVal ; }
org . junit . Assert . assertEquals ( expResult , result )
testAddLongStringByteSequence ( ) { final int COUNT = 10 ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( COUNT ) ; scheduler . addListener ( new org . apache . activemq . broker . scheduler . JobListener ( ) { @ org . apache . activemq . broker . scheduler . Override public void scheduledJob ( java . lang . String id , org . apache . activemq . util . ByteSequence job ) { latch . countDown ( ) ; } } ) ; for ( int i = 0 ; i < COUNT ; i ++ ) { java . lang . String test = new java . lang . String ( ( "test" + i ) ) ; scheduler . schedule ( ( "id" + i ) , new org . apache . activemq . util . ByteSequence ( test . getBytes ( ) ) , 1000 ) ; } latch . await ( 5 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return timeStatistic . getCount ( ) ; }
org . junit . Assert . assertEquals ( 0 , latch . getCount ( ) )
testRegisterListenerOtherThread ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > exception = new java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > ( null ) ; final com . sun . sgs . service . TransactionListener listener = new com . sun . sgs . test . util . DummyTransactionListener ( ) ; java . lang . Thread thread = new java . lang . Thread ( ) { public void run ( ) { try { txn . registerListener ( listener ) ; } catch ( java . lang . RuntimeException e ) { e . printStackTrace ( ) ; exception . set ( e ) ; } } } ; thread . start ( ) ; thread . join ( ) ; java . lang . RuntimeException e = exception . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return object ; }
org . junit . Assert . assertEquals ( com . sun . sgs . test . impl . service . transaction . IllegalStateException . class , ( e == null ? null : e . getClass ( ) ) )
testCaSTransform2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 0 , 4 , 5 } ) ; org . nd4j . linalg . api . ndarray . INDArray comp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 3 , 2 , 3 , 4 , 5 } ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . transforms . comparison . CompareAndSet ( array , 3.0 , org . nd4j . linalg . indexing . conditions . Conditions . lessThan ( 2 ) ) ) ; "<AssertPlaceHolder>" ; } lessThan ( java . lang . Number ) { return new org . nd4j . linalg . indexing . conditions . LessThan ( value ) ; }
org . junit . Assert . assertEquals ( comp , array )
testGetTableCellRendererComponent ( ) { System . out . println ( "getTableCellRendererComponent" ) ; javax . swing . JTable table = new javax . swing . JTable ( ) ; java . lang . Object color = java . awt . Color . red ; boolean isSelected = false ; boolean hasFocus = false ; int row = 0 ; int column = 0 ; kg . apc . jmeter . graphs . ColorRenderer instance = new kg . apc . jmeter . graphs . ColorRenderer ( true ) ; java . awt . Component result = instance . getTableCellRendererComponent ( table , color , isSelected , hasFocus , row , column ) ; "<AssertPlaceHolder>" ; } getTableCellRendererComponent ( kg . apc . jmeter . vizualizers . JTable , java . lang . Object , boolean , boolean , int , int ) { if ( table != null ) { javax . swing . table . JTableHeader header = table . getTableHeader ( ) ; if ( header != null ) { setForeground ( header . getForeground ( ) ) ; setBackground ( header . getBackground ( ) ) ; setFont ( header . getFont ( ) ) ; } setText ( getText ( value , row , column ) ) ; setBorder ( kg . apc . jmeter . vizualizers . UIManager . getBorder ( "TableHeader.cellBorder" ) ) ; setHorizontalAlignment ( SwingConstants . CENTER ) ; } return this ; }
org . junit . Assert . assertNotNull ( result )
testSecureSourceWhileChannelConnected ( ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "192.168.1.22" , 2727 ) ; final org . restcomm . media . core . network . deprecated . channel . NetworkChannel channel = org . mockito . Mockito . mock ( org . restcomm . media . core . network . deprecated . channel . NetworkChannel . class ) ; final org . restcomm . media . core . network . deprecated . channel . NetworkGuard guard = new org . restcomm . media . core . network . deprecated . channel . SbcNetworkGuard ( ) ; org . mockito . Mockito . when ( channel . isConnected ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( channel . getRemoteAddress ( ) ) . thenReturn ( remoteAddress ) ; final boolean secure = guard . isSecure ( channel , remoteAddress ) ; "<AssertPlaceHolder>" ; } isSecure ( org . restcomm . media . core . network . deprecated . channel . NetworkChannel , java . net . InetSocketAddress ) { if ( channel . isConnected ( ) ) { return channel . getRemoteAddress ( ) . equals ( source ) ; } return false ; }
org . junit . Assert . assertTrue ( secure )
testGetRasterNamesToBeExported_exportMasksOnly ( ) { final boolean exportMasks = true ; final org . esa . beam . pixex . output . PixExRasterNamesFactory pixExRasterNamesFactory = new org . esa . beam . pixex . output . PixExRasterNamesFactory ( false , false , exportMasks , null ) ; final java . lang . String [ ] rasterNames = pixExRasterNamesFactory . getRasterNames ( product ) ; final java . lang . String [ ] expected = new java . lang . String [ ] { "mask1" , "mask2" , "mask3" } ; "<AssertPlaceHolder>" ; } getRasterNames ( org . esa . beam . framework . datamodel . Product ) { final java . lang . String productType = product . getProductType ( ) ; if ( rasterNamesMap . containsKey ( productType ) ) { return rasterNamesMap . get ( productType ) ; } else { final java . lang . String [ ] rasterNames = extractRasterNames ( product , aggregatorStrategy ) ; rasterNamesMap . put ( productType , rasterNames ) ; return rasterNames ; } }
org . junit . Assert . assertThat ( rasterNames , org . hamcrest . CoreMatchers . equalTo ( expected ) )
client_registration_sets_time_to_live ( ) { givenASimpleClient ( lifetime ) ; registry . registerClient ( client ) ; "<AssertPlaceHolder>" ; } isAlive ( ) { return ( ( lastUpdate . getTime ( ) ) + ( ( lifeTimeInSec ) * 1000 ) ) > ( java . lang . System . currentTimeMillis ( ) ) ; }
org . junit . Assert . assertTrue ( client . isAlive ( ) )
setDatacontainerValues_configuratorURL_CUSTOMER_SUBSCRIPTION ( ) { org . oscm . domobjects . Product prod = createProduct ( 1 , 1 , ServiceType . CUSTOMER_SUBSCRIPTION ) ; org . oscm . domobjects . Product copy = new org . oscm . domobjects . Product ( ) ; prod . setDatacontainerValues ( copy , ServiceType . CUSTOMER_SUBSCRIPTION ) ; "<AssertPlaceHolder>" ; } getConfiguratorUrl ( ) { return vo . getConfiguratorUrl ( ) ; }
org . junit . Assert . assertEquals ( null , copy . getConfiguratorUrl ( ) )
intstream_of ( ) { java . util . OptionalInt max = java . util . stream . IntStream . of ( 5 , 10 ) . max ( ) ; "<AssertPlaceHolder>" ; } getAsInt ( ) { return 10 ; }
org . junit . Assert . assertEquals ( 10 , max . getAsInt ( ) )
messageReaderBuilderTest ( ) { java . io . InputStream stream = new java . io . ByteArrayInputStream ( "" . getBytes ( ) ) ; software . amazon . kinesis . multilang . MessageReader reader = new software . amazon . kinesis . multilang . MessageReader ( ) . initialize ( stream , software . amazon . kinesis . multilang . MessageReaderTest . shardId , new com . fasterxml . jackson . databind . ObjectMapper ( ) , java . util . concurrent . Executors . newCachedThreadPool ( ) ) ; "<AssertPlaceHolder>" ; } initialize ( java . io . InputStream , java . lang . String , com . fasterxml . jackson . databind . ObjectMapper , java . util . concurrent . ExecutorService ) { return this . initialize ( new java . io . BufferedReader ( new java . io . InputStreamReader ( stream ) ) , shardId , objectMapper , executorService ) ; }
org . junit . Assert . assertNotNull ( reader )
testSumComputedEquals ( ) { de . lessvoid . nifty . tools . SizeValue a = de . lessvoid . nifty . tools . SizeValue . sum ( 5 ) ; de . lessvoid . nifty . tools . SizeValue b = new de . lessvoid . nifty . tools . SizeValue ( SizeValueType . Sum , 5 ) ; "<AssertPlaceHolder>" ; } sum ( int ) { return new de . lessvoid . nifty . tools . SizeValue ( SizeValueType . Sum , computedValue ) ; }
org . junit . Assert . assertEquals ( a , b )
testAddVariableToRootInnerAndListProperty ( ) { java . util . Map < java . lang . String , java . lang . Object > commandMap = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String , java . lang . Object > pParams = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String , java . lang . Object > xxx1Params = new java . util . LinkedHashMap ( ) ; xxx1Params . put ( "@userId" , "$p.page" ) ; xxx1Params . put ( "worldName" , "galaxy" ) ; pParams . put ( "$XXX1<sp>=<sp>/foo/hello-world" , xxx1Params ) ; java . util . Map < java . lang . String , java . lang . Object > xxx2Params = new java . util . LinkedHashMap ( ) ; xxx2Params . put ( "@userId" , "$p.page" ) ; xxx2Params . put ( "worldName" , "star" ) ; pParams . put ( "data.$XXX2<sp>=<sp>/foo/hello-world" , xxx2Params ) ; java . util . Map < java . lang . String , java . lang . Object > xxx3Params = new java . util . LinkedHashMap ( ) ; xxx3Params . put ( "@userId" , "$p.page" ) ; xxx3Params . put ( "worldName" , "pulsar" ) ; pParams . put ( "list.$XXX3<sp>=<sp>/foo/hello-world" , xxx3Params ) ; commandMap . put ( "$p<sp>=<sp>/foo/get-foo-data-page" , pParams ) ; java . util . Map < java . lang . String , java . lang . Object > expectedMap = prepareExpectedMap ( true , true , false ) ; java . util . Map < java . lang . String , java . lang . Object > actualMap = invokeAndReturnMap ( commandMap ) ; "<AssertPlaceHolder>" ; } invokeAndReturnMap ( java . lang . Object ) { java . lang . String json = invoke ( command ) ; return toMap ( json ) ; }
org . junit . Assert . assertEquals ( expectedMap , actualMap )
shouldInjectPipelineBatch ( ) { com . couchbase . client . java . query . N1qlParams source = com . couchbase . client . java . query . N1qlParams . build ( ) . pipelineBatch ( 99 ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "pipeline_batch" , "99" ) ; com . couchbase . client . java . document . json . JsonObject actual = com . couchbase . client . java . document . json . JsonObject . empty ( ) ; source . injectParams ( actual ) ; "<AssertPlaceHolder>" ; } injectParams ( com . couchbase . client . java . document . json . JsonObject ) { if ( ( this . serverSideTimeout ) != null ) { queryJson . put ( "timeout" , this . serverSideTimeout ) ; } if ( ( this . clientContextId ) != null ) { queryJson . put ( "client_context_id" , this . clientContextId ) ; } if ( pretty ) { queryJson . put ( "pretty" , true ) ; } if ( deferred ) { queryJson . put ( "mode" , "async" ) ; } if ( ( this . rawParams ) != null ) { for ( Map . Entry < java . lang . String , java . lang . Object > entry : rawParams . entrySet ( ) ) { queryJson . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } }
org . junit . Assert . assertEquals ( expected , actual )
conversionToDataType ( ) { final org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 dcv = new org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 ( value ) ; dcv . setOtherwise ( isOtherwise ) ; cellUtilities . convertDTCellValueType ( DataType . DataTypes . NUMERIC_INTEGER , dcv ) ; "<AssertPlaceHolder>" ; } getNumericValue ( ) { try { if ( ( realCellValue . getNumericValue ( ) ) != null ) { return new org . drools . verifier . core . index . keys . Values ( ( ( java . lang . Comparable ) ( realCellValue . getNumericValue ( ) ) ) ) ; } else { return new org . drools . verifier . core . index . keys . Values ( ) ; } } catch ( final java . lang . Exception e ) { throw new org . drools . workbench . services . verifier . plugin . client . builders . ValueResolveException ( "Failed<sp>to<sp>resolve<sp>Numeric<sp>Value" ) ; } }
org . junit . Assert . assertEquals ( expected , dcv . getNumericValue ( ) )
testFireAndAlarm ( ) { org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Room > room = any ( org . drools . modelcompiler . fireandalarm . model . Room . class ) ; org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Fire > fire = any ( org . drools . modelcompiler . fireandalarm . model . Fire . class ) ; org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Sprinkler > sprinkler = any ( org . drools . modelcompiler . fireandalarm . model . Sprinkler . class ) ; org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Alarm > alarm = any ( org . drools . modelcompiler . fireandalarm . model . Alarm . class ) ; org . drools . model . Rule r1 = rule ( "When<sp>there<sp>is<sp>a<sp>fire<sp>turn<sp>on<sp>the<sp>sprinkler" ) . build ( expr ( sprinkler , ( s ) -> ! ( s . isOn ( ) ) ) , expr ( sprinkler , fire , ( s , f ) -> s . getRoom ( ) . equals ( f . getRoom ( ) ) ) , on ( sprinkler ) . execute ( ( drools , s ) -> { System . out . println ( ( "Lower<sp>the<sp>alarm<sp>when<sp>all<sp>the<sp>fires<sp>have<sp>gone" 1 + ( s . getRoom ( ) . getName ( ) ) ) ) ; s . setOn ( true ) ; drools . update ( s , "Lower<sp>the<sp>alarm<sp>when<sp>all<sp>the<sp>fires<sp>have<sp>gone" 0 ) ; } ) ) ; org . drools . model . Rule r2 = rule ( "When<sp>the<sp>fire<sp>is<sp>gone<sp>turn<sp>off<sp>the<sp>sprinkler" ) . build ( expr ( sprinkler , Sprinkler :: isOn ) , not ( fire , sprinkler , ( f , s ) -> f . getRoom ( ) . equals ( s . getRoom ( ) ) ) , on ( sprinkler ) . execute ( ( drools , s ) -> { System . out . println ( ( "Turn<sp>off<sp>the<sp>sprinkler<sp>for<sp>room<sp>" + ( s . getRoom ( ) . getName ( ) ) ) ) ; s . setOn ( false ) ; drools . update ( s , "Lower<sp>the<sp>alarm<sp>when<sp>all<sp>the<sp>fires<sp>have<sp>gone" 0 ) ; } ) ) ; org . drools . model . Rule r3 = rule ( "Raise<sp>the<sp>alarm<sp>when<sp>we<sp>have<sp>one<sp>or<sp>more<sp>fires" ) . build ( exists ( fire ) , execute ( ( drools ) -> { System . out . println ( "Raise<sp>the<sp>alarm" ) ; drools . insert ( new org . drools . modelcompiler . fireandalarm . model . Alarm ( ) ) ; } ) ) ; org . drools . model . Rule r4 = rule ( "Lower<sp>the<sp>alarm<sp>when<sp>all<sp>the<sp>fires<sp>have<sp>gone" ) . build ( not ( fire ) , input ( alarm ) , on ( alarm ) . execute ( ( drools , a ) -> { System . out . println ( "Lower<sp>the<sp>alarm" ) ; drools . delete ( a ) ; } ) ) ; org . drools . model . Rule r5 = rule ( "Status<sp>output<sp>when<sp>things<sp>are<sp>ok" ) . build ( not ( alarm ) , not ( sprinkler , Sprinkler :: isOn ) , execute ( ( ) -> System . out . println ( "Everything<sp>is<sp>ok" ) ) ) ; org . drools . model . Model model = new org . drools . model . impl . ModelImpl ( ) . withRules ( asList ( r1 , r2 , r3 , r4 , r5 ) ) ; org . kie . api . KieBase kieBase = org . drools . modelcompiler . builder . KieBaseBuilder . createKieBaseFromModel ( model ) ; org . kie . api . runtime . KieSession ksession = kieBase . newKieSession ( ) ; org . drools . modelcompiler . fireandalarm . model . Room room1 = new org . drools . modelcompiler . fireandalarm . model . Room ( "Room<sp>1" ) ; ksession . insert ( room1 ) ; org . kie . api . runtime . rule . FactHandle fireFact1 = ksession . insert ( new org . drools . modelcompiler . fireandalarm . model . Fire ( room1 ) ) ; ksession . fireAllRules ( ) ; org . drools . modelcompiler . fireandalarm . model . Sprinkler sprinkler1 = new org . drools . modelcompiler . fireandalarm . model . Sprinkler ( room1 ) ; ksession . insert ( sprinkler1 ) ; ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; ksession . delete ( fireFact1 ) ; ksession . fireAllRules ( ) ; } isOn ( ) { return on ; }
org . junit . Assert . assertTrue ( sprinkler1 . isOn ( ) )
test_withAmount_BigDecimal_same ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . withAmount ( org . joda . money . TestBigMoney . BIGDEC_2_34 ) ; "<AssertPlaceHolder>" ; } withAmount ( double ) { return withAmount ( amount , RoundingMode . UNNECESSARY ) ; }
org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test )
generateInvocationIdIfLengthIsPositive ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . GENERATE_INVOCATION_ID ) ) ) ) . thenReturn ( "1" ) ; "<AssertPlaceHolder>" ; } shouldGenerateInvocationId ( ) { return true ; }
org . junit . Assert . assertThat ( unit . shouldGenerateInvocationId ( ) , org . hamcrest . Matchers . is ( true ) )
thenApply ( ) { final eu . toolchain . concurrent . Completable < java . lang . Integer > a = setupFuture ( ) ; final eu . toolchain . concurrent . Stage < java . lang . Integer > next = a . thenApply ( ( v ) -> v + ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) ) ; a . complete ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) ; "<AssertPlaceHolder>" ; } join ( ) { throw new java . util . concurrent . CancellationException ( ) ; }
org . junit . Assert . assertThat ( next . join ( ) , org . hamcrest . core . Is . is ( ( ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) + ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) ) ) )
testShouldFindExistingVoluntarySavingsAccountsForClientsWhenCenterIsTopOfCustomerHierarchy ( ) { savingsProduct = new org . mifos . domain . builders . SavingsProductBuilder ( ) . voluntary ( ) . appliesToClientsOnly ( ) . buildForIntegrationTests ( ) ; savingsAccount = new org . mifos . domain . builders . SavingsAccountBuilder ( ) . completeGroup ( ) . withSavingsProduct ( savingsProduct ) . withCustomer ( group ) . withCreatedBy ( org . mifos . framework . util . helpers . IntegrationTestObjectMother . testUser ( ) ) . build ( ) ; org . mifos . framework . util . helpers . IntegrationTestObjectMother . saveSavingsProductAndAssociatedSavingsAccounts ( savingsProduct , savingsAccount ) ; java . util . List < org . mifos . application . servicefacade . CollectionSheetCustomerSavingDto > mandatorySavingAccounts = savingsDao . findAllVoluntarySavingAccountsForClientsAndGroupsWithCompleteGroupStatusForCustomerHierarchy ( customerHierarchyParams ) ; "<AssertPlaceHolder>" ; } size ( ) { return fieldErrors . size ( ) ; }
org . junit . Assert . assertThat ( mandatorySavingAccounts . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
options_inMemoryFilteringContains ( ) { comboBox . setFilteringMode ( FilteringMode . CONTAINS ) ; for ( int i = 0 ; i < 21 ; i ++ ) { comboBox . addItem ( ( "" + i ) ) ; } com . vaadin . v7 . ui . ComboBoxTest . setFilterAndCurrentPage ( comboBox , "2" , 0 ) ; java . util . List < ? > options = comboBox . getFilteredOptions ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return pendingInvocations . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , options . size ( ) )
testCleanUp ( ) { org . opencastproject . dictionary . regexp . DictionaryServiceImpl service = new org . opencastproject . dictionary . regexp . DictionaryServiceImpl ( ) ; java . lang . String in = "This<sp>is<sp>a<sp>test<sp>sentence." ; java . lang . String out = "This<sp>is<sp>a<sp>test<sp>sentence" ; "<AssertPlaceHolder>" ; } cleanUpText ( java . lang . String ) { org . opencastproject . dictionary . regexp . DictionaryServiceImpl . logger . debug ( "Text<sp>input:<sp>{}" , text ) ; java . util . LinkedList < java . lang . String > words = new java . util . LinkedList < java . lang . String > ( ) ; java . util . regex . Matcher matcher = compilesPattern . matcher ( text ) ; while ( matcher . find ( ) ) { words . add ( matcher . group ( ) ) ; } java . lang . String result = org . apache . commons . lang3 . StringUtils . join ( words , "<sp>" ) ; org . opencastproject . dictionary . regexp . DictionaryServiceImpl . logger . debug ( "Resulting<sp>text:<sp>{}" , result ) ; if ( "" . equals ( result ) ) { return null ; } return new org . opencastproject . metadata . mpeg7 . TextualImpl ( result ) ; }
org . junit . Assert . assertEquals ( out , service . cleanUpText ( in ) . getText ( ) )
deleteNonExistent ( ) { final java . lang . String dummyId = "94bcb762-9ee9-4b43-a912-063509966988" ; "<AssertPlaceHolder>" ; } delete ( boolean ) { structuredDelegate . delete ( deleteData ) ; }
org . junit . Assert . assertFalse ( store . delete ( dummyId ) )
testMongoClientDeleteResultWithRemovedCountSpecified ( ) { long randomRemoved = io . vertx . test . core . TestUtils . randomLong ( ) ; io . vertx . ext . mongo . MongoClientDeleteResult mongoClientDeleteResult = new io . vertx . ext . mongo . MongoClientDeleteResult ( randomRemoved ) ; "<AssertPlaceHolder>" ; } getRemovedCount ( ) { return docRemovedCount ; }
org . junit . Assert . assertEquals ( randomRemoved , mongoClientDeleteResult . getRemovedCount ( ) )
testSetHandler ( ) { org . eclipse . rap . rwt . remote . OperationHandler handler = mock ( org . eclipse . rap . rwt . remote . OperationHandler . class ) ; remoteObject . setHandler ( handler ) ; org . eclipse . rap . rwt . remote . OperationHandler result = remoteObject . getHandler ( ) ; "<AssertPlaceHolder>" ; } getHandler ( ) { return handler ; }
org . junit . Assert . assertEquals ( handler , result )
sendAmqpMessageEncodeThrowsBufferOverflowSuccess ( ) { tests . unit . com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpsConnection amqpsConnection = new tests . unit . com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpsConnection ( tests . unit . com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpConnectionTest . TEST_HOST_NAME , mockedProvisionOperations , null , null , false ) ; mockit . Deencapsulation . setField ( amqpsConnection , "isOpen" , true ) ; mockit . Deencapsulation . setField ( amqpsConnection , "amqpDeviceOperations" , mockedProvisionOperations ) ; new mockit . NonStrictExpectations ( ) { { mockedMessage . encode ( ( ( byte [ ] ) ( any ) ) , 0 ) ; result = new java . nio . BufferOverflowException ( ) ; mockedMessage . encode ( ( ( byte [ ] ) ( any ) ) , 0 ) ; result = 10 ; } } ; boolean result = amqpsConnection . sendAmqpMessage ( mockedMessage ) ; "<AssertPlaceHolder>" ; } sendAmqpMessage ( com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpMessage ) { if ( ( ( this . saslListener ) != null ) && ( ( this . saslListener . getSavedException ( ) ) != null ) ) { throw this . saslListener . getSavedException ( ) ; } boolean result ; logger . LogDebug ( "Entered<sp>in<sp>method<sp>%s" , logger . getMethodName ( ) ) ; if ( ! ( this . isOpen ) ) { result = false ; } else { byte [ ] msgData = new byte [ 1024 ] ; int length = 0 ; boolean encodingComplete = false ; do { try { length = message . encode ( msgData , 0 ) ; encodingComplete = true ; } catch ( java . nio . BufferOverflowException e ) { msgData = new byte [ ( msgData . length ) * 2 ] ; } } while ( ! encodingComplete ) ; if ( length > 0 ) { byte [ ] tag = java . lang . String . valueOf ( this . nextTag ) . getBytes ( ) ; if ( ( ( this . nextTag ) == ( Integer . MAX_VALUE ) ) || ( ( this . nextTag ) < 0 ) ) { this . nextTag = 0 ; } else { ( this . nextTag ) ++ ; } amqpDeviceOperations . sendMessage ( tag , msgData , length , 0 ) ; result = true ; } else { result = false ; } } logger . LogDebug ( "Exited<sp>from<sp>method<sp>%s" , logger . getMethodName ( ) ) ; return result ; }
org . junit . Assert . assertEquals ( true , result )
testGetSyntaxErrors_NoQuotes_End ( ) { a . setProperty ( "prop" , "Expected<sp>value<sp>is<sp>{0}" ) ; final org . oscm . build . ant . PropertiesSyntaxChecker checker = new org . oscm . build . ant . PropertiesSyntaxChecker ( a ) ; "<AssertPlaceHolder>" ; } getSyntaxSingleQuotesErrorKeys ( ) { java . lang . String singleQuoted = "\'\\{[0-9]+\\}\'" ; java . lang . String notQuote = "[^']{1}" ; java . lang . String begin = ( ( "^(" + singleQuoted ) + notQuote ) + ")" ; java . lang . String end = ( ( "(" + notQuote ) + singleQuoted ) + ")$" ; java . lang . String middle = ( notQuote + singleQuoted ) + notQuote ; java . lang . String exact = ( "^(" + singleQuoted ) + ")$" ; java . lang . String pattern = ( ( ( ( ( ( ( "(" + begin ) + ")|(" ) + middle ) + ")|(" ) + end ) + ")|(" ) + exact ) + ")" ; final java . util . regex . Pattern VAR_PATTERN_SYNTAX = java . util . regex . Pattern . compile ( pattern ) ; java . util . Set < java . util . Map . Entry < java . lang . Object , java . lang . Object > > s = a . entrySet ( ) ; java . util . Iterator < java . util . Map . Entry < java . lang . Object , java . lang . Object > > it = s . iterator ( ) ; final java . util . Set < java . lang . String > result = new java . util . HashSet < java . lang . String > ( ) ; while ( it . hasNext ( ) ) { final java . util . Map . Entry < java . lang . Object , java . lang . Object > propEntry = it . next ( ) ; java . lang . String text = propEntry . getValue ( ) . toString ( ) ; final java . util . regex . Matcher m = VAR_PATTERN_SYNTAX . matcher ( text ) ; if ( m . find ( ) ) { result . add ( propEntry . getKey ( ) . toString ( ) ) ; } } return result ; }
org . junit . Assert . assertEquals ( 0 , checker . getSyntaxSingleQuotesErrorKeys ( ) . size ( ) )
testAssertTrue ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "count(//xs:element[@name='assertTrueField']//xs:enumeration[@value='true'])<sp>=<sp>1<sp>and<sp>count(//xs:element[@name='assertTrueField']//xs:enumeration[@value='1'])<sp>=<sp>1<sp>and<sp>count(//xs:element[@name='assertTrueField']//xs:enumeration)<sp>=<sp>2" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
test_getConvexHull__448546 ( ) { org . eclipse . gef . geometry . planar . Point [ ] points = org . eclipse . gef . geometry . internal . utils . PointListUtils . toPointsArray ( new double [ ] { - 22.27172999999999 , 100.0 , - 22.27172999999999 , 129.33333333333334 , 222.27173 , 100.0 , 222.27173 , 129.33333333333334 , 224.27173 , 100.0 , 224.27173 , 129.33333333333334 , 468.81519 , 100.0 , 468.81519 , 129.33333333333334 , 505.81519000000003 , 100.0 , 505.81519000000003 , 129.33333333333334 , 592.66301 , 100.0 , 592.66301 , 129.33333333333334 , 594.66301 , 100.0 , 594.66301 , 129.33333333333334 , 681.5108299999999 , 100.0 , 681.5108299999999 , 129.33333333333334 , 470.81519 , 100.0 , 470.81519 , 150.0 , 503.81519 , 100.0 , 503.81519 , 150.0 , 683.5108299999999 , 100.0 , 683.5108299999999 , 129.33333333333334 , 927.7896999999999 , 100.0 , 927.7896999999999 , 129.33333333333334 , 929.7896999999999 , 100.0 , 929.7896999999999 , 129.33333333333334 , 1095.3089466666665 , 100.0 , 1095.3089466666665 , 129.33333333333334 , 1167.3089466666665 , 100.0 , 1167.3089466666665 , 129.33333333333334 , 1254.06857 , 100.0 , 1254.06857 , 129.33333333333334 , 1256.06857 , 100.0 , 1256.06857 , 129.33333333333334 , 1342.8281933333333 , 100.0 , 1342.8281933333333 , 129.33333333333334 , 1097.3089466666665 , 100.0 , 1097.3089466666665 , 150.0 , 1130.3089466666665 , 100.0 , 1130.3089466666665 , 150.0 , 1132.3089466666665 , 100.0 , 1132.3089466666665 , 150.0 , 1165.3089466666665 , 100.0 , 1165.3089466666665 , 150.0 } ) ; boolean thrown = false ; try { org . eclipse . gef . geometry . planar . Point . getConvexHull ( points ) ; } catch ( java . lang . Exception x ) { thrown = true ; } "<AssertPlaceHolder>" ; } getConvexHull ( org . eclipse . gef . geometry . planar . Point [ ] ) { if ( ( points . length ) <= 3 ) { return org . eclipse . gef . geometry . planar . Point . getCopy ( points ) ; } points = org . eclipse . gef . geometry . planar . Point . eliminateDuplicates ( points ) ; int minIdx = 0 ; org . eclipse . gef . geometry . planar . Point min = points [ minIdx ] ; for ( int i = 1 ; i < ( points . length ) ; i ++ ) { if ( ( ( points [ i ] . y ) < ( min . y ) ) || ( ( ( points [ i ] . y ) == ( min . y ) ) && ( ( points [ i ] . x ) < ( min . x ) ) ) ) { min = points [ i ] ; minIdx = i ; } } org . eclipse . gef . geometry . planar . Point tmp = points [ 0 ] ; points [ 0 ] = points [ minIdx ] ; points [ minIdx ] = tmp ; final org . eclipse . gef . geometry . planar . Point p0 = points [ 0 ] ; java . util . Arrays . sort ( points , 1 , points . length , new java . util . Comparator < org . eclipse . gef . geometry . planar . Point > ( ) { @ org . eclipse . gef . geometry . planar . Override public int compare ( org . eclipse . gef . geometry . planar . Point p1 , org . eclipse . gef . geometry . planar . Point p2 ) { double d = org . eclipse . gef . geometry . euclidean . Straight . getSignedDistanceCCW ( p0 , p1 , p2 ) ; if ( org . eclipse . gef . geometry . internal . utils . PrecisionUtils . equal ( d , 0 ) ) { return 0 ; } return d < 0 ? - 1 : 1 ; } } ) ; java . util . ArrayList < org . eclipse . gef . geometry . planar . Point > convexHull = new java . util . ArrayList ( ) ; convexHull . add ( points [ 2 ] ) ; convexHull . add ( points [ 1 ] ) ; convexHull . add ( points [ 0 ] ) ; for ( int i = 3 ; i < ( points . length ) ; i ++ ) { while ( ( ( convexHull . size ( ) ) > 2 ) && ( ( org . eclipse . gef . geometry . euclidean . Straight . getSignedDistanceCCW ( convexHull . get ( 1 ) , convexHull . get ( 0 ) , points [ i ] ) ) > 0 ) ) { convexHull . remove ( 0 ) ; } convexHull . add ( 0 , points [ i ] ) ; } return convexHull . toArray ( new org . eclipse . gef . geometry . planar . Point [ ] { } ) ; }
org . junit . Assert . assertEquals ( false , thrown )
testNextBoundNameRead ( ) { com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . setBinding ( txn , "a" , 100 ) ; newTransaction ( ) ; com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . getBinding ( txn , "a" ) ; com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . Runner runner = new com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . Runner ( new com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . NextBoundName ( "a" ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { if ( ! ( done ) ) { throw new java . lang . IllegalStateException ( "not<sp>done" ) ; } return result ; }
org . junit . Assert . assertSame ( null , runner . getResult ( ) )
test ( ) { try ( final me . geso . avans . ControllerBaseTest . MyController controller = new me . geso . avans . ControllerBaseTest . MyController ( ) ) { final me . geso . avans . Filters filters = controller . getFilters ( ) ; "<AssertPlaceHolder>" ; } } getResponseFilters ( ) { return this . responseFilters ; }
org . junit . Assert . assertThat ( filters . getResponseFilters ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
phraseTest ( ) { java . lang . String query = "ID<sp>==<sp>'TEST_ID'<sp>&&<sp>content:phrase(termOffsetMap,'boy','car')" ; final java . util . List < datawave . webservice . query . result . event . DefaultEvent > events = getQueryResults ( query , true , true ) ; "<AssertPlaceHolder>" ; final java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "boy" , "car" ) ; datawave . query . jexl . functions . ContentFunctionQueryTest . evaluateEvents ( events , expected ) ; } size ( ) { return this . typeMetadata . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , events . size ( ) )
testHospitalSets ( ) { java . lang . String code = "" ; try { code = _setupTestHospital ( true ) ; _checkHospitalIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkHospitalIntoDb ( java . lang . String ) { org . isf . hospital . model . Hospital foundHospital ; foundHospital = ( ( org . isf . hospital . model . Hospital ) ( org . isf . hospital . test . Tests . jpa . find ( org . isf . hospital . model . Hospital . class , code ) ) ) ; org . isf . hospital . test . Tests . testHospital . check ( foundHospital ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
remove_on_that_collection__check_size_is_0_after ( ) { com . artemis . utils . IntBag bag = new com . artemis . utils . IntBag ( 20 ) ; bag . add ( 8008 ) ; com . artemis . utils . IntBagIterator intBagIterator = new com . artemis . utils . IntBagIterator ( bag ) ; intBagIterator . next ( ) ; intBagIterator . remove ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 0 , bag . size ( ) )
shouldMapLONRegion ( ) { com . rackspace . docs . core . event . Region region = org . openstack . atlas . atomhopper . factory . UsageEntryFactoryImpl . mapRegion ( "LON" ) ; "<AssertPlaceHolder>" ; } mapRegion ( java . lang . String ) { if ( configRegion . equals ( "DFW" ) ) { return com . rackspace . docs . core . event . Region . DFW ; } else if ( configRegion . equals ( "ORD" ) ) { return com . rackspace . docs . core . event . Region . ORD ; } else if ( configRegion . equals ( "LON" ) ) { return com . rackspace . docs . core . event . Region . LON ; } else if ( configRegion . equals ( "SYD" ) ) { return com . rackspace . docs . core . event . Region . SYD ; } else if ( configRegion . equals ( "IAD" ) ) { return com . rackspace . docs . core . event . Region . IAD ; } else if ( configRegion . equals ( "HKG" ) ) { return com . rackspace . docs . core . event . Region . HKG ; } else { org . openstack . atlas . atomhopper . factory . UsageEntryFactoryImpl . LOG . error ( "Region<sp>could<sp>not<sp>be<sp>mapped<sp>from<sp>config,<sp>using<sp>default" ) ; return com . rackspace . docs . core . event . Region . GLOBAL ; } }
org . junit . Assert . assertEquals ( Region . LON , region )
testCompareTo_less ( ) { com . google . appengine . api . users . User user1 = new com . google . appengine . api . users . User ( "aa" , "dd" ) ; com . google . appengine . api . users . User user2 = new com . google . appengine . api . users . User ( "bb" , "cc" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( ( user1 . compareTo ( user2 ) ) < 0 ) )
testOperation5 ( ) { test . MyBuggy b = new test . MyBuggy ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( null , b . operation ( 12 , 1 , null ) )
testSuitableIfCacheEntryIsFresh ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Cache-Control" , "max-age=3600" ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Content-Length" , "128" ) } ; entry = getEntry ( headers ) ; "<AssertPlaceHolder>" ; } canCachedResponseBeUsed ( org . apache . hc . core5 . http . HttpHost , org . apache . hc . core5 . http . HttpRequest , org . apache . hc . client5 . http . cache . HttpCacheEntry , java . util . Date ) { if ( ! ( isFreshEnough ( entry , request , now ) ) ) { log . debug ( "Cache<sp>entry<sp>is<sp>not<sp>fresh<sp>enough" ) ; return false ; } if ( ( isGet ( request ) ) && ( ! ( validityStrategy . contentLengthHeaderMatchesActualLength ( entry ) ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 1 ) ; return false ; } if ( hasUnsupportedConditionalHeaders ( request ) ) { log . debug ( "Request<sp>contains<sp>unsupported<sp>conditional<sp>headers" ) ; return false ; } if ( ( ! ( isConditional ( request ) ) ) && ( ( entry . getStatus ( ) ) == ( org . apache . hc . core5 . http . HttpStatus . SC_NOT_MODIFIED ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 2 ) ; return false ; } if ( ( isConditional ( request ) ) && ( ! ( allConditionalsMatch ( request , entry , now ) ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" ) ; return false ; } if ( hasUnsupportedCacheEntryForGet ( request , entry ) ) { log . debug ( ( "HEAD<sp>response<sp>caching<sp>enabled<sp>but<sp>the<sp>cache<sp>entry<sp>does<sp>not<sp>contain<sp>a<sp>" + "request<sp>method,<sp>entity<sp>or<sp>a<sp>204<sp>response" ) ) ; return false ; } final java . util . Iterator < org . apache . hc . core5 . http . HeaderElement > it = org . apache . hc . core5 . http . message . MessageSupport . iterate ( request , HeaderConstants . CACHE_CONTROL ) ; while ( it . hasNext ( ) ) { final org . apache . hc . core5 . http . HeaderElement elt = it . next ( ) ; if ( HeaderConstants . CACHE_CONTROL_NO_CACHE . equals ( elt . getName ( ) ) ) { log . debug ( "Response<sp>contained<sp>NO<sp>CACHE<sp>directive,<sp>cache<sp>was<sp>not<sp>suitable" ) ; return false ; } if ( HeaderConstants . CACHE_CONTROL_NO_STORE . equals ( elt . getName ( ) ) ) { log . debug ( "Response<sp>contained<sp>NO<sp>STORE<sp>directive,<sp>cache<sp>was<sp>not<sp>suitable" ) ; return false ; } if ( HeaderConstants . CACHE_CONTROL_MAX_AGE . equals ( elt . getName ( ) ) ) { try { final int maxage = java . lang . Integer . parseInt ( elt . getValue ( ) ) ; if ( ( validityStrategy . getCurrentAgeSecs ( entry , now ) ) > maxage ) { log . debug ( "Response<sp>from<sp>cache<sp>was<sp>NOT<sp>suitable<sp>due<sp>to<sp>max<sp>age" ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 4 + ( ex . getMessage ( ) ) ) ) ; return false ; } } if ( HeaderConstants . CACHE_CONTROL_MAX_STALE . equals ( elt . getName ( ) ) ) { try { final int maxstale = java . lang . Integer . parseInt ( elt . getValue ( ) ) ; if ( ( validityStrategy . getFreshnessLifetimeSecs ( entry ) ) > maxstale ) { log . debug ( "Response<sp>from<sp>cache<sp>was<sp>not<sp>suitable<sp>due<sp>to<sp>Max<sp>stale<sp>freshness" ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 3 + ( ex . getMessage ( ) ) ) ) ; return false ; } } if ( HeaderConstants . CACHE_CONTROL_MIN_FRESH . equals ( elt . getName ( ) ) ) { try { final long minfresh = java . lang . Long . parseLong ( elt . getValue ( ) ) ; if ( minfresh < 0L ) { return false ; } final long age = validityStrategy . getCurrentAgeSecs ( entry , now ) ; final long freshness = validityStrategy . getFreshnessLifetimeSecs ( entry ) ; if ( ( freshness - age ) < minfresh ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 0 + "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 5 ) ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 3 + ( ex . getMessage ( ) ) ) ) ; return false ; } } } log . debug ( "Response<sp>from<sp>cache<sp>was<sp>suitable" ) ; return true ; }
org . junit . Assert . assertTrue ( impl . canCachedResponseBeUsed ( host , request , entry , now ) )
testCreateStream ( ) { mockStorageContainer ( org . apache . bookkeeper . stream . storage . impl . service . RangeStoreServiceImplTest . SCID ) ; org . apache . bookkeeper . stream . proto . storage . CreateStreamResponse expectedResp = org . apache . bookkeeper . stream . proto . storage . CreateStreamResponse . getDefaultInstance ( ) ; when ( rrStore . createStream ( any ( org . apache . bookkeeper . stream . proto . storage . CreateStreamRequest . class ) ) ) . thenReturn ( org . apache . bookkeeper . common . concurrent . FutureUtils . value ( expectedResp ) ) ; org . apache . bookkeeper . stream . proto . storage . CreateStreamRequest expectedReq = org . apache . bookkeeper . stream . proto . storage . CreateStreamRequest . getDefaultInstance ( ) ; "<AssertPlaceHolder>" ; verify ( rrStore , times ( 1 ) ) . createStream ( same ( expectedReq ) ) ; } result ( java . util . concurrent . CompletableFuture ) { return org . apache . bookkeeper . common . concurrent . FutureUtils . result ( future , org . apache . bookkeeper . common . concurrent . FutureUtils . DEFAULT_EXCEPTION_HANDLER ) ; }
org . junit . Assert . assertSame ( expectedResp , org . apache . bookkeeper . common . concurrent . FutureUtils . result ( rrStore . createStream ( expectedReq ) ) )
getUser_7 ( ) { when ( this . userManager . getUser ( org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( null ) ; com . agiletec . aps . system . services . user . UserDetails user = this . authenticationProviderManager . getUser ( "test_user" , "password" ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( userManager , org . mockito . Mockito . times ( 0 ) ) . updateLastAccess ( org . mockito . Mockito . any ( com . agiletec . aps . system . services . user . UserDetails . class ) ) ; org . mockito . Mockito . verify ( authorizationManager , org . mockito . Mockito . times ( 0 ) ) . getUserAuthorizations ( org . mockito . Mockito . anyString ( ) ) ; org . mockito . Mockito . verify ( tokenManager , org . mockito . Mockito . times ( 0 ) ) . createAccessTokenForLocalUser ( org . mockito . Mockito . anyString ( ) ) ; } getUser ( java . lang . String , java . lang . String ) { com . agiletec . aps . system . services . user . UserDetails user = null ; try { user = this . getUserDAO ( ) . loadUser ( username , password ) ; } catch ( java . lang . Throwable t ) { com . agiletec . aps . system . services . user . UserManager . _logger . error ( "Error<sp>loading<sp>user<sp>by<sp>username<sp>and<sp>password.<sp>username:<sp>'{}'" , username , t ) ; throw new com . agiletec . aps . system . exception . ApsSystemException ( "Error<sp>loading<sp>user" , t ) ; } this . setUserCredentialCheckParams ( user ) ; return user ; }
org . junit . Assert . assertNull ( user )
testForNullPointerException ( ) { java . util . List < java . lang . String > sentence = java . util . Arrays . asList ( "The" , "and" 6 , "were" , "running" , "and" , "and" 0 , "bark,bark" 0 , "and" 5 , "street" ) ; java . util . List < java . lang . String > sentencePOS = java . util . Arrays . asList ( "and" 3 , "NNS" , "VBD" , "and" 4 , "and" 9 , "and" 4 , "RP" , "and" 3 , "and" 1 ) ; java . util . List < java . util . List < java . lang . String > > expectedLemmas = new java . util . ArrayList ( ) ; expectedLemmas . add ( java . util . Arrays . asList ( "and" 5 ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "dog" ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "and" 2 ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "and" 8 ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "and" ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "bark,bark" ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "bark,bark" 0 ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "and" 5 ) ) ; expectedLemmas . add ( java . util . Arrays . asList ( "street" ) ) ; java . util . List < java . util . List < java . lang . String > > actualLemmas = opennlp . tools . lemmatizer . DictionaryLemmatizerMultiTest . dictionaryLemmatizer . lemmatize ( sentence , sentencePOS ) ; for ( int i = 0 ; i < ( sentence . size ( ) ) ; i ++ ) { if ( ! ( actualLemmas . get ( 0 ) . get ( 0 ) . equals ( "and" 7 ) ) ) "<AssertPlaceHolder>" ; } } get ( T ) { java . lang . Double d = normalize ( ) . get ( t ) ; if ( d == null ) return 0.0 ; return d ; }
org . junit . Assert . assertEquals ( expectedLemmas . get ( i ) , actualLemmas . get ( i ) )
testNewInstance ( ) { org . objenesis . Objenesis o = new org . objenesis . ObjenesisStd ( ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class ) { return org . objenesis . ObjenesisHelper . OBJENESIS_STD . newInstance ( clazz ) ; }
org . junit . Assert . assertEquals ( getClass ( ) , o . newInstance ( getClass ( ) ) . getClass ( ) )
testSimpleBeanInjected ( ) { "<AssertPlaceHolder>" ; bean . ping ( ) ; }
org . junit . Assert . assertNotNull ( bean )
shouldNotRemoveOrphanVersionsWhenProxyRemovedButLiveRemains ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , "testfile1" , "File" ) ; doc = session . createDocument ( doc ) ; org . nuxeo . ecm . core . api . DocumentRef ver = doc . checkIn ( VersioningOption . MINOR , "" ) ; org . nuxeo . ecm . core . api . DocumentModel proxy = session . createProxy ( ver , session . getRootDocument ( ) . getRef ( ) ) ; session . removeDocument ( proxy . getRef ( ) ) ; session . save ( ) ; waitForAsyncCompletion ( ) ; org . nuxeo . ecm . core . api . DocumentModelList vs = getVersion ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getCollectedDocumentIds ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , vs . size ( ) )
tryNextAddressIfTimeoutExceptionNoAutoRecovery ( ) { final com . rabbitmq . client . impl . AMQConnection connectionThatThrowsTimeout = mock ( com . rabbitmq . client . impl . AMQConnection . class ) ; final com . rabbitmq . client . impl . AMQConnection connectionThatSucceeds = mock ( com . rabbitmq . client . impl . AMQConnection . class ) ; final java . util . Queue < com . rabbitmq . client . impl . AMQConnection > connections = new java . util . concurrent . ArrayBlockingQueue < com . rabbitmq . client . impl . AMQConnection > ( 10 ) ; connections . add ( connectionThatThrowsTimeout ) ; connections . add ( connectionThatSucceeds ) ; com . rabbitmq . client . ConnectionFactory connectionFactory = new com . rabbitmq . client . ConnectionFactory ( ) { @ com . rabbitmq . client . test . Override protected com . rabbitmq . client . impl . AMQConnection createConnection ( com . rabbitmq . client . impl . ConnectionParams params , com . rabbitmq . client . impl . FrameHandler frameHandler , com . rabbitmq . client . MetricsCollector metricsCollector ) { return connections . poll ( ) ; } @ com . rabbitmq . client . test . Override protected synchronized com . rabbitmq . client . impl . FrameHandlerFactory createFrameHandlerFactory ( ) { return mock ( com . rabbitmq . client . impl . FrameHandlerFactory . class ) ; } } ; connectionFactory . setAutomaticRecoveryEnabled ( false ) ; doThrow ( java . util . concurrent . TimeoutException . class ) . when ( connectionThatThrowsTimeout ) . start ( ) ; doNothing ( ) . when ( connectionThatSucceeds ) . start ( ) ; com . rabbitmq . client . Connection returnedConnection = connectionFactory . newConnection ( new com . rabbitmq . client . Address [ ] { new com . rabbitmq . client . Address ( "host1" ) , new com . rabbitmq . client . Address ( "host2" ) } ) ; "<AssertPlaceHolder>" ; } newConnection ( java . util . concurrent . ExecutorService , java . lang . String ) { return newConnection ( executor , java . util . Collections . singletonList ( new com . rabbitmq . client . Address ( getHost ( ) , getPort ( ) ) ) , connectionName ) ; }
org . junit . Assert . assertSame ( connectionThatSucceeds , returnedConnection )
testContentName ( ) { request . setContentName ( "name" ) ; "<AssertPlaceHolder>" ; } getContentName ( ) { return ( ( java . lang . String ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . CONTENT_NAME ) ) ) ; }
org . junit . Assert . assertEquals ( "name" , request . getContentName ( ) )
testCellCounteOutOfTimeRange ( ) { final org . apache . hadoop . hbase . TableName sourceTable = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; byte [ ] [ ] families = new byte [ ] [ ] { org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_A , org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_B } ; org . apache . hadoop . hbase . client . Table t = org . apache . hadoop . hbase . mapreduce . TestCellCounter . UTIL . createTable ( sourceTable , families ) ; try { org . apache . hadoop . hbase . client . Put p = new org . apache . hadoop . hbase . client . Put ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . ROW1 ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_A , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , org . apache . hadoop . hbase . mapreduce . TestCellCounter . now , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Data11" ) ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_B , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , ( ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) + 1 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Data12" ) ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_A , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , ( ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) + 2 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Data13" ) ) ; t . put ( p ) ; p = new org . apache . hadoop . hbase . client . Put ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . ROW2 ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_B , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , org . apache . hadoop . hbase . mapreduce . TestCellCounter . now , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Dat21" ) ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_A , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , ( ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) + 1 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Data22" ) ) ; p . addColumn ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_B , org . apache . hadoop . hbase . mapreduce . TestCellCounter . QUALIFIER , ( ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) + 2 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( "Data23" ) ) ; t . put ( p ) ; java . lang . String [ ] args = new java . lang . String [ ] { sourceTable . getNameAsString ( ) , org . apache . hadoop . hbase . mapreduce . TestCellCounter . FQ_OUTPUT_DIR . toString ( ) , ";" , ( "--starttime=" + ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) ) + 1 , ( "--endtime=" + ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . now ) ) + 2 } ; runCount ( args ) ; org . apache . hadoop . hbase . mapreduce . FileInputStream inputStream = new org . apache . hadoop . hbase . mapreduce . FileInputStream ( ( ( ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . OUTPUT_DIR ) + ( File . separator ) ) + "part-r-00000" ) ) ; java . lang . String data = org . apache . commons . io . IOUtils . toString ( inputStream ) ; inputStream . close ( ) ; "<AssertPlaceHolder>" ; } finally { t . close ( ) ; org . apache . hadoop . fs . FileUtil . fullyDelete ( new org . apache . hadoop . hbase . mapreduce . File ( org . apache . hadoop . hbase . mapreduce . TestCellCounter . OUTPUT_DIR ) ) ; } } isEmpty ( ) { return nodes . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( data . isEmpty ( ) )
testConstructor ( ) { final java . util . List < com . allanbank . mongodb . bson . Element > elements = java . util . Collections . singletonList ( ( ( com . allanbank . mongodb . bson . Element ) ( new com . allanbank . mongodb . bson . element . BooleanElement ( "1" , false ) ) ) ) ; final com . allanbank . mongodb . bson . impl . ImmutableDocument element = new com . allanbank . mongodb . bson . impl . ImmutableDocument ( new com . allanbank . mongodb . bson . impl . RootDocument ( elements ) ) ; "<AssertPlaceHolder>" ; } getElements ( ) { return myElements ; }
org . junit . Assert . assertEquals ( elements , element . getElements ( ) )
testThreadSafetyOfCipherService ( ) { int threadCount = 30 ; final org . pentaho . platform . engine . security . CipherEncryptionService service = new org . pentaho . platform . engine . security . CipherEncryptionService ( ) ; service . afterPropertiesSet ( ) ; java . util . concurrent . ArrayBlockingQueue < java . lang . Runnable > queue = new java . util . concurrent . ArrayBlockingQueue < java . lang . Runnable > ( threadCount ) ; java . util . concurrent . ThreadPoolExecutor executor = new java . util . concurrent . ThreadPoolExecutor ( 10 , 50 , 1 , java . util . concurrent . TimeUnit . SECONDS , queue ) ; for ( int i = 0 ; i < threadCount ; i ++ ) { executor . execute ( new java . lang . Runnable ( ) { @ org . pentaho . platform . engine . security . Override public void run ( ) { try { java . lang . String s = null ; java . lang . String enc = null ; java . lang . String dec = null ; for ( int i = 0 ; i < 50 ; i ++ ) { s = org . pentaho . platform . util . UUIDUtil . getUUIDAsString ( ) ; enc = service . encrypt ( s ) ; dec = service . decrypt ( enc ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception ex ) { ex . printStackTrace ( ) ; org . junit . Assert . fail ( ex . toString ( ) ) ; } } } ) ; } executor . shutdown ( ) ; boolean isTerminated = executor . awaitTermination ( 200 , TimeUnit . SECONDS ) ; if ( ! isTerminated ) { org . junit . Assert . fail ( "It<sp>took<sp>too<sp>long<sp>to<sp>run<sp>the<sp>threading<sp>test." ) ; } } decrypt ( java . lang . String ) { java . lang . String decrypted ; try { org . pentaho . platform . util . Base64PasswordService ps = new org . pentaho . platform . util . Base64PasswordService ( ) ; if ( encoded . startsWith ( "ENC:" ) ) { decrypted = ps . decrypt ( encoded . substring ( 4 , encoded . length ( ) ) ) ; } else { decrypted = ps . decrypt ( encoded ) ; } } catch ( java . lang . Exception e ) { decrypted = encoded ; } return decrypted ; }
org . junit . Assert . assertEquals ( s , dec )
unknown_target_type_does_no_transform_doc_string ( ) { java . lang . String docString = "A<sp>rather<sp>long<sp>and<sp>boring<sp>string<sp>of<sp>documentation" ; io . cucumber . stepexpression . StepExpression expression = new io . cucumber . stepexpression . StepExpressionFactory ( registry ) . createExpression ( "Given<sp>some<sp>stuff:" , io . cucumber . stepexpression . StepExpressionFactoryTest . UNKNOWN_TYPE ) ; java . util . List < io . cucumber . stepexpression . Argument > match = expression . match ( "Given<sp>some<sp>stuff:" , docString ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return objects . get ( name ) ; }
org . junit . Assert . assertEquals ( docString , match . get ( 0 ) . getValue ( ) )
testRollbackAndDoubleExecution ( ) { final org . apache . hadoop . hbase . NamespaceDescriptor nsd = org . apache . hadoop . hbase . NamespaceDescriptor . create ( "testRollbackAndDoubleExecution" ) . build ( ) ; final java . lang . String nsKey = "foo" ; final java . lang . String nsValue = "bar" ; final org . apache . hadoop . hbase . procedure2 . ProcedureExecutor < org . apache . hadoop . hbase . master . procedure . MasterProcedureEnv > procExec = getMasterProcedureExecutor ( ) ; createNamespaceForTesting ( nsd ) ; org . apache . hadoop . hbase . procedure2 . ProcedureTestingUtility . waitNoProcedureRunning ( procExec ) ; org . apache . hadoop . hbase . procedure2 . ProcedureTestingUtility . setKillAndToggleBeforeStoreUpdate ( procExec , true ) ; long procId = procExec . submitProcedure ( new org . apache . hadoop . hbase . master . procedure . ModifyNamespaceProcedure ( procExec . getEnvironment ( ) , org . apache . hadoop . hbase . NamespaceDescriptor . create ( nsd ) . addConfiguration ( nsKey , nsValue ) . build ( ) ) ) ; int lastStep = 2 ; org . apache . hadoop . hbase . master . procedure . MasterProcedureTestingUtility . testRollbackAndDoubleExecution ( procExec , procId , lastStep ) ; org . apache . hadoop . hbase . NamespaceDescriptor currentNsDescriptor = org . apache . hadoop . hbase . master . procedure . TestModifyNamespaceProcedure . UTIL . getAdmin ( ) . getNamespaceDescriptor ( nsd . getName ( ) ) ; "<AssertPlaceHolder>" ; } getConfigurationValue ( java . lang . String ) { return configuration . get ( key ) ; }
org . junit . Assert . assertNull ( currentNsDescriptor . getConfigurationValue ( nsKey ) )
testConvertToDataModelTypeWithoutStats ( ) { studyEntry . getSamplesData ( ) . clear ( ) ; org . opencb . opencga . storage . mongodb . variant . converters . List < java . lang . String > sampleNames = null ; org . opencb . opencga . storage . mongodb . variant . converters . DocumentToStudyVariantEntryConverter converter = new org . opencb . opencga . storage . mongodb . variant . converters . DocumentToStudyVariantEntryConverter ( true , studyId , fileId , new org . opencb . opencga . storage . mongodb . variant . converters . DocumentToSamplesConverter ( studyId , sampleNames , "0/0" ) ) ; org . opencb . biodata . models . variant . StudyEntry converted = converter . convertToDataModelType ( mongoStudy ) ; "<AssertPlaceHolder>" ; } convertToDataModelType ( org . bson . Document ) { org . bson . Document projects = ( ( org . bson . Document ) ( object . get ( "projects" ) ) ) ; return super . convertToDataModelType ( projects ) ; }
org . junit . Assert . assertEquals ( studyEntry , converted )
testClear ( ) { tested . open ( diagram , callback ) ; tested . clear ( ) ; "<AssertPlaceHolder>" ; verify ( viewer , times ( 1 ) ) . clear ( ) ; } getInstance ( ) { return delegate . getInstance ( ) ; }
org . junit . Assert . assertNull ( tested . getInstance ( ) )
testCanAddALongTermIdentifier ( ) { final long lti = smem . smem_lti_add_id ( 'Z' , 99 ) ; "<AssertPlaceHolder>" ; } smem_lti_add_id ( char , long ) { long return_val = 0 ; db . lti_add . setLong ( 1 , ( ( long ) ( name_letter ) ) ) ; db . lti_add . setLong ( 2 , ( ( long ) ( name_number ) ) ) ; db . lti_add . setLong ( 3 , 0 ) ; db . lti_add . setDouble ( 4 , 0 ) ; db . lti_add . setLong ( 5 , 0 ) ; db . lti_add . setLong ( 6 , 0 ) ; db . lti_add . setLong ( 7 , 0 ) ; return_val = org . jsoar . util . JdbcTools . insertAndGetRowId ( db . lti_add ) ; stats . nodes . set ( ( ( stats . nodes . get ( ) ) + 1 ) ) ; return return_val ; }
org . junit . Assert . assertEquals ( 1 , lti )
testReadArrayNotEnough ( ) { org . apache . hadoop . hdfs . util . ExactSizeInputStream s = new org . apache . hadoop . hdfs . util . ExactSizeInputStream ( org . apache . hadoop . hdfs . util . TestExactSizeInputStream . byteStream ( "he" ) , 5 ) ; byte [ ] buf = new byte [ 10 ] ; "<AssertPlaceHolder>" ; try { s . read ( buf , 2 , 3 ) ; org . junit . Assert . fail ( "Read<sp>buf<sp>when<sp>should<sp>be<sp>out<sp>of<sp>data" ) ; } catch ( java . io . EOFException e ) { } } read ( byte [ ] , int , int ) { if ( b == null ) { throw new java . lang . NullPointerException ( ) ; } else if ( ( ( off < 0 ) || ( len < 0 ) ) || ( len > ( ( b . length ) - off ) ) ) { throw new java . lang . IndexOutOfBoundsException ( ) ; } else if ( len == 0 ) { return 0 ; } checkStream ( ) ; if ( ( pos ) < ( length ) ) { int n = ( ( int ) ( java . lang . Math . min ( len , ( ( length ) - ( pos ) ) ) ) ) ; java . lang . System . arraycopy ( data , pos , b , off , n ) ; pos += n ; return n ; } return - 1 ; }
org . junit . Assert . assertEquals ( 2 , s . read ( buf , 0 , 5 ) )
testCreateDatabaseConnectionAttributes ( ) { "<AssertPlaceHolder>" ; } createDatabaseConnectionAttributes ( ) { return new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . DatabaseConnection . Attributes ( ) ; }
org . junit . Assert . assertNotNull ( factory . createDatabaseConnectionAttributes ( ) )
ACLproncipal_hreffalse ( ) { java . lang . String aclString = "<D:acl<sp>xmlns:D='DAV:'<sp>xml:base='https://fqdn/aclTest/__role/__/'>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "</D:privilege>" 1 + "<D:principal>" ) + "<D:href>" ) + "</D:privilege>" 2 ) + "role" ) + "</D:test>" ) + "</D:privilege>" 3 ) + "</D:principal>" ) + "</D:privilege>" 5 ) + "<D:privilege>" ) + "</D:privilege>" 0 ) + "</D:privilege>" ) + "</D:privilege>" 4 ) + "</D:ace>" ) + "</D:acl>" ) ; com . fujitsu . dc . core . model . jaxb . Acl aclToSet = null ; java . io . Reader reader = new java . io . StringReader ( aclString ) ; aclToSet = com . fujitsu . dc . core . model . jaxb . ObjectIo . unmarshal ( reader , com . fujitsu . dc . core . model . jaxb . Acl . class ) ; "<AssertPlaceHolder>" ; } validateAcl ( boolean ) { if ( ( aces ) == null ) { return true ; } for ( com . fujitsu . dc . core . model . jaxb . Ace ace : aces ) { if ( ( ( ace . grant ) == null ) || ( ( ace . principal ) == null ) ) { return false ; } if ( ( ace . grant . privileges ) == null ) { return false ; } java . util . Map < java . lang . String , com . fujitsu . dc . core . auth . CellPrivilege > cellPrivilegeMap = com . fujitsu . dc . core . auth . CellPrivilege . getPrivilegeMap ( ) ; java . util . Map < java . lang . String , com . fujitsu . dc . core . auth . BoxPrivilege > boxPrivilegeMap = com . fujitsu . dc . core . auth . BoxPrivilege . getPrivilegeMap ( ) ; for ( com . fujitsu . dc . core . auth . com . fujitsu . dc . core . model . jaxb . Privilege privilege : ace . grant . privileges ) { if ( ( privilege . body ) == null ) { return false ; } if ( isCellLevel ) { if ( ! ( cellPrivilegeMap . containsKey ( privilege . body . getLocalName ( ) ) ) ) { return false ; } } else { if ( ! ( boxPrivilegeMap . containsKey ( privilege . body . getLocalName ( ) ) ) ) { return false ; } } } if ( ( ( ace . principal . all ) == null ) && ( ( ( ace . principal . href ) == null ) || ( ace . principal . href . equals ( "" ) ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertFalse ( aclToSet . validateAcl ( true ) )