input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testFilteredWithNoPaths ( ) { java . util . Map < java . lang . String , java . lang . String > values = new java . util . HashMap ( ) ; values . put ( "foo/bar" , "baz" ) ; final org . microbule . config . api . Config config = new org . microbule . config . core . MapConfig ( values , "/" ) . filtered ( ) ; "<AssertPlaceHolder>" ; } filtered ( java . lang . String [ ] ) { com . google . gson . JsonObject filteredJson = recordedJson ; for ( java . lang . String path : paths ) { com . google . gson . JsonObject sub = new com . google . gson . JsonObject ( ) ; filteredJson . add ( path , sub ) ; filteredJson = sub ; } return new org . microbule . config . core . RecordingConfig ( delegate . filtered ( paths ) , filteredJson ) ; }
org . junit . Assert . assertEquals ( "baz" , config . filtered ( "foo" ) . value ( "bar" ) . get ( ) )
testNullStapel ( ) { "<AssertPlaceHolder>" ; } converteerKindStapels ( java . util . List ) { if ( brpStapels == null ) { return java . util . Collections . emptyList ( ) ; } final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > > stapels = new java . util . ArrayList ( ) ; for ( final nl . bzk . migratiebrp . conversie . model . brp . BrpStapel < nl . bzk . migratiebrp . conversie . model . brp . groep . BrpIstRelatieGroepInhoud > brpStapel : brpStapels ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3KindInhoud > lo3Stapel = converteerKind ( brpStapel ) ; stapels . add ( lo3Stapel ) ; } return stapels ; }
org . junit . Assert . assertTrue ( subject . converteerKindStapels ( null ) . isEmpty ( ) )
testIsStructureWhenItReturnsTrue ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final java . lang . String structure = "Structure" ; when ( dataTypeManager . structure ( ) ) . thenReturn ( structure ) ; when ( dataType . getType ( ) ) . thenReturn ( structure ) ; "<AssertPlaceHolder>" ; } isStructure ( org . kie . workbench . common . dmn . client . editors . types . common . DataType ) { return java . util . Objects . equals ( dataType . getType ( ) , dataTypeManager . structure ( ) ) ; }
org . junit . Assert . assertTrue ( handler . isStructure ( dataType ) )
testBadMimeType ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . datamodel . User theOwner = new net . violet . platform . datamodel . mock . UserMock ( 42 , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , frLang , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , getParisTimezone ( ) ) ; final net . violet . platform . datamodel . Files inFileXML = new net . violet . platform . datamodel . mock . FilesMock ( "$HOME/DesktopPutTest/1" , MimeType . MIME_TYPES . XML ) ; final java . util . Date now = new java . util . Date ( ) ; final net . violet . platform . datamodel . Application theApplication = new net . violet . platform . datamodel . mock . ApplicationMock ( 42 , "My<sp>first<sp>application" , getPrivateUser ( ) , now ) ; final net . violet . platform . datamodel . ApplicationCredentials cred = new net . violet . platform . datamodel . mock . ApplicationCredentialsMock ( "6992873d28d86925325dc52d15d6feec30bb2da5" , "59e6060a53ab1be5" , theApplication ) ; final net . violet . platform . api . callers . APICaller caller = new net . violet . platform . api . callers . ApplicationAPICaller ( net . violet . platform . dataobjects . ApplicationCredentialsData . getData ( cred ) ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; final java . util . Calendar theCal = java . util . Calendar . getInstance ( ) ; theCal . add ( Calendar . YEAR , 1 ) ; final java . util . Date expiration = theCal . getTime ( ) ; theParams . put ( ActionParam . SESSION_PARAM_KEY , net . violet . platform . api . authentication . SessionManager . generateSessionId ( caller , net . violet . platform . dataobjects . UserData . getData ( theOwner ) , expiration ) ) ; final net . violet . platform . dataobjects . FilesData mdata = net . violet . platform . dataobjects . FilesData . getData ( inFileXML ) ; theParams . put ( "file" , mdata . getApiId ( caller ) ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . libraries . Put ( ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } put ( K , T ) { this . mMap . put ( theRef , new net . violet . db . cache . CacheReference < K , T > ( theRef , theRecord , this . mReferenceQueue ) ) ; this . mLinkedMap . put ( theRef , theRecord ) ; }
org . junit . Assert . assertNull ( theResult )
testReadWriteFile ( ) { java . io . File tmpFile = new java . io . File ( java . lang . System . getProperty ( "java.io.tmpdir" ) , ( ( "ndarraytmp-" + ( java . util . UUID . randomUUID ( ) . toString ( ) ) ) + "<sp>.bin" ) ) ; tmpFile . deleteOnExit ( ) ; org . nd4j . linalg . api . ndarray . INDArray rand = org . nd4j . linalg . factory . Nd4j . randn ( 5 , 5 ) ; org . nd4j . serde . binary . BinarySerde . writeArrayToDisk ( rand , tmpFile ) ; org . nd4j . linalg . api . ndarray . INDArray fromDisk = org . nd4j . serde . binary . BinarySerde . readFromDisk ( tmpFile ) ; "<AssertPlaceHolder>" ; } readFromDisk ( org . nd4j . serde . binary . File ) { try ( org . nd4j . serde . binary . FileInputStream os = new org . nd4j . serde . binary . FileInputStream ( readFrom ) ) { java . nio . channels . FileChannel channel = os . getChannel ( ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocateDirect ( ( ( int ) ( readFrom . length ( ) ) ) ) ; channel . read ( buffer ) ; org . nd4j . linalg . api . ndarray . INDArray ret = org . nd4j . serde . binary . BinarySerde . toArray ( buffer ) ; return ret ; } }
org . junit . Assert . assertEquals ( rand , fromDisk )
saveAndRetrieveBasicResource ( ) { java . lang . String input = org . apache . commons . io . IOUtils . toString ( getClass ( ) . getResourceAsStream ( "/basic-stu3.xml" ) , StandardCharsets . UTF_8 ) ; java . lang . String respString = ourClient . transaction ( ) . withBundle ( input ) . prettyPrint ( ) . execute ( ) ; ca . uhn . fhir . jpa . provider . ResourceProviderDstu2Test . ourLog . info ( respString ) ; ca . uhn . fhir . model . dstu2 . resource . Bundle bundle = myFhirCtx . newXmlParser ( ) . parseResource ( ca . uhn . fhir . model . dstu2 . resource . Bundle . class , respString ) ; ca . uhn . fhir . model . primitive . IdDt id = new ca . uhn . fhir . model . primitive . IdDt ( bundle . getEntry ( ) . get ( 0 ) . getResponse ( ) . getLocation ( ) ) ; ca . uhn . fhir . model . dstu2 . resource . Basic basic = ourClient . read ( ) . resource ( ca . uhn . fhir . model . dstu2 . resource . Basic . class ) . withId ( id ) . execute ( ) ; java . util . List < ca . uhn . fhir . model . api . ExtensionDt > exts = basic . getUndeclaredExtensionsByUrl ( "http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DateID" ) ; "<AssertPlaceHolder>" ; } size ( ) { return myTagSet . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , exts . size ( ) )
isGreaterThanQuantityTest ( ) { java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > times = new java . util . ArrayList ( ) ; times . add ( timeFactory . create ( 30 , Units . HOUR ) ) ; times . add ( timeFactory . create ( 24 , Units . HOUR ) ) ; times . add ( timeFactory . create ( 1440 , Units . MINUTE ) ) ; java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > list = times . stream ( ) . filter ( tec . uom . se . function . QuantityFunctions . isGreaterThan ( timeFactory . create ( 1 , Units . DAY ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Number , javax . measure . Unit ) { return tec . uom . se . quantity . Quantities . getQuantity ( value , unit ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , java . lang . Integer . valueOf ( list . size ( ) ) )
canWritePieceInMultiFileMode ( ) { java . lang . String baseDir = this . getClass ( ) . getResource ( "/" ) . getFile ( ) ; baseDir = java . net . URLDecoder . decode ( baseDir , "utf-8" ) ; baseDir = new java . io . File ( baseDir ) . getPath ( ) ; files . TorrentFile torrent = mock ( files . TorrentFile . class ) ; java . util . LinkedList < files . FileInfo > files = new java . util . LinkedList < files . FileInfo > ( ) ; files . add ( new files . FileInfo ( "file1/file1.txt" , 16 ) ) ; files . add ( new files . FileInfo ( "file2/file2.txt" , 32 ) ) ; when ( torrent . getName ( ) ) . thenReturn ( "files" ) ; when ( torrent . getFiles ( ) ) . thenReturn ( files ) ; when ( torrent . getPieceLength ( ) ) . thenReturn ( 4 ) ; when ( torrent . isSingleFile ( ) ) . thenReturn ( false ) ; files . Piece p = mock ( files . Piece . class ) ; when ( p . getIndex ( ) ) . thenReturn ( 4 ) ; when ( p . getBytes ( ) ) . thenReturn ( "test" . getBytes ( ) ) ; files . PieceWriter writer = new files . PieceWriter ( baseDir , torrent ) ; writer . reserve ( ) ; writer . writePiece ( p ) ; java . io . File file = new java . io . File ( ( baseDir + "/files/file2/file2.txt" ) ) ; byte [ ] entireFile = java . nio . file . Files . readAllBytes ( file . toPath ( ) ) ; java . lang . String s = new java . lang . String ( java . util . Arrays . copyOfRange ( entireFile , 0 , 4 ) ) ; "<AssertPlaceHolder>" ; writer . close ( ) ; } writePiece ( files . Piece ) { long startIndex = ( torrent . getPieceLength ( ) ) * ( p . getIndex ( ) ) ; java . io . RandomAccessFile raf ; if ( torrent . isSingleFile ( ) ) { raf = files . get ( 0 ) . getFile ( ) ; raf . seek ( startIndex ) ; raf . write ( p . getBytes ( ) ) ; } else { writeMultiple ( p ) ; } }
org . junit . Assert . assertEquals ( "test" , s )
testExistingHeader ( ) { io . grpc . Metadata headers = new io . grpc . Metadata ( ) ; java . lang . String overrideValue = "override-value" ; headers . put ( com . google . cloud . bigtable . grpc . io . GoogleCloudResourcePrefixInterceptor . GRPC_RESOURCE_PREFIX_KEY , overrideValue ) ; underTest . updateHeaders ( headers ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Class ) { return ( ( U ) ( unsafeMap . get ( key ) ) ) ; }
org . junit . Assert . assertEquals ( overrideValue , headers . get ( com . google . cloud . bigtable . grpc . io . GoogleCloudResourcePrefixInterceptor . GRPC_RESOURCE_PREFIX_KEY ) )
testSerializesAndDeserializes ( ) { org . calrissian . mango . domain . event . Event event = org . calrissian . mango . domain . event . EventBuilder . create ( "" , "id" , java . lang . System . currentTimeMillis ( ) ) . attr ( new org . calrissian . mango . domain . Attribute ( "key" , "val" , com . google . common . collect . ImmutableMap . of ( "metaKey" , "metaVal" ) ) ) . build ( ) ; byte [ ] serialized = serialize ( new org . calrissian . accumulorecipes . commons . hadoop . EventWritable ( event ) ) ; org . calrissian . mango . domain . event . Event actual = asWritable ( serialized , org . calrissian . accumulorecipes . commons . hadoop . EventWritable . class ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return attribute ; }
org . junit . Assert . assertEquals ( event , actual )
whenRouteStateIsSetWithGenericMethodAndCapacity_itMustBeSetCorrectly ( ) { jsprit . core . problem . solution . route . VehicleRoute route = getRoute ( mock ( jsprit . core . problem . vehicle . Vehicle . class ) ) ; jsprit . core . algorithm . state . StateManager stateManager = new jsprit . core . algorithm . state . StateManager ( vrpMock ) ; jsprit . core . algorithm . state . StateId id = stateManager . createStateId ( "myState" ) ; jsprit . core . algorithm . state . Capacity capacity = Capacity . Builder . newInstance ( ) . addDimension ( 0 , 500 ) . build ( ) ; stateManager . putRouteState ( route , id , capacity ) ; jsprit . core . algorithm . state . Capacity getCap = stateManager . getRouteState ( route , id , jsprit . core . algorithm . state . Capacity . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 500 , getCap . get ( 0 ) )
testCloseSubscriberUnsubscribeException ( ) { transport . dispatcher = mockDispatcher ; org . mockito . Mockito . doThrow ( new java . lang . IllegalStateException ( "Problem" ) ) . when ( mockDispatcher ) . unsubscribe ( formattedSubject ) ; transport . unsubscribe ( ) ; "<AssertPlaceHolder>" ; } isSubscribed ( ) { return ( ( session ) != null ) && ( ( consumer ) != null ) ; }
org . junit . Assert . assertFalse ( transport . isSubscribed ( ) )
testGetLongAttValue2 ( ) { final java . lang . String s = "<test<sp>attr='1234567890'/>" ; final org . w3c . dom . Document doc = org . oscm . converter . XMLConverter . convertToDocument ( s , false ) ; final long value = org . oscm . converter . XMLConverter . getLongAttValue ( doc . getDocumentElement ( ) , "none" ) ; "<AssertPlaceHolder>" ; } getLongAttValue ( org . w3c . dom . Node , java . lang . String ) { long result = 0 ; org . w3c . dom . Node attNode = node . getAttributes ( ) . getNamedItem ( attName ) ; if ( attNode != null ) { result = java . lang . Long . parseLong ( attNode . getNodeValue ( ) ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , value )
testNotFound ( ) { com . db4o . omplus . connection . test . File file = nonExistentFile ( ) ; try { new com . db4o . omplus . connection . test . FileConnectionParams ( file . getAbsolutePath ( ) ) . connect ( ) ; org . junit . Assert . fail ( ) ; } catch ( com . db4o . omplus . connection . test . DBConnectException exc ) { com . db4o . omplus . connection . test . FileNotFoundException cause = ( ( com . db4o . omplus . connection . test . FileNotFoundException ) ( exc . getCause ( ) ) ) ; "<AssertPlaceHolder>" ; } } getAbsolutePath ( ) { try { return realFile ( ) . getCanonicalPath ( ) ; } catch ( com . db4o . util . file . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( file . getAbsolutePath ( ) , cause . getMessage ( ) )
testTransferFileToOutputStreamWithDeflate ( ) { java . io . File f = java . io . File . createTempFile ( "test" , "test" ) ; java . net . URL inUrl = com . cedarsoftware . util . TestIOUtilities . class . getClassLoader ( ) . getResource ( "test.inflate" ) ; java . io . FileInputStream in = new java . io . FileInputStream ( new java . io . File ( inUrl . getFile ( ) ) ) ; java . net . URLConnection c = mock ( java . net . URLConnection . class ) ; when ( c . getInputStream ( ) ) . thenReturn ( in ) ; when ( c . getContentEncoding ( ) ) . thenReturn ( "deflate" ) ; com . cedarsoftware . util . IOUtilities . transfer ( c , f , null ) ; com . cedarsoftware . util . IOUtilities . close ( in ) ; java . io . FileInputStream actualIn = new java . io . FileInputStream ( f ) ; java . io . ByteArrayOutputStream actualResult = new java . io . ByteArrayOutputStream ( 8192 ) ; com . cedarsoftware . util . IOUtilities . transfer ( actualIn , actualResult ) ; com . cedarsoftware . util . IOUtilities . close ( actualIn ) ; com . cedarsoftware . util . IOUtilities . close ( actualResult ) ; java . io . ByteArrayOutputStream expectedResult = getUncompressedByteArray ( ) ; "<AssertPlaceHolder>" ; f . delete ( ) ; } getUncompressedByteArray ( ) { java . net . URL inUrl = com . cedarsoftware . util . TestIOUtilities . class . getClassLoader ( ) . getResource ( "test.txt" ) ; java . io . ByteArrayOutputStream start = new java . io . ByteArrayOutputStream ( 8192 ) ; java . io . FileInputStream in = new java . io . FileInputStream ( inUrl . getFile ( ) ) ; com . cedarsoftware . util . IOUtilities . transfer ( in , start ) ; com . cedarsoftware . util . IOUtilities . close ( in ) ; return start ; }
org . junit . Assert . assertArrayEquals ( expectedResult . toByteArray ( ) , actualResult . toByteArray ( ) )
testNonExistingHashMapAttributeWithoutStrictVariables ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; java . lang . String source = "{{<sp>object.nonExisting<sp>}}" ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( source ) ; java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( "name" , "Steve" ) ; context . put ( "object" , map ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , context ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , writer . toString ( ) )
testLogin ( ) { com . flickr4java . flickr . test . TestInterface iface = flickr . getTestInterface ( ) ; com . flickr4java . flickr . people . User user = iface . login ( ) ; "<AssertPlaceHolder>" ; } login ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "method" , com . flickr4java . flickr . test . TestInterface . METHOD_LOGIN ) ; com . flickr4java . flickr . Response response = transport . post ( transport . getPath ( ) , parameters , apiKey , sharedSecret ) ; if ( response . isError ( ) ) { throw new com . flickr4java . flickr . FlickrException ( response . getErrorCode ( ) , response . getErrorMessage ( ) ) ; } org . w3c . dom . Element userElement = response . getPayload ( ) ; com . flickr4java . flickr . people . User user = new com . flickr4java . flickr . people . User ( ) ; user . setId ( userElement . getAttribute ( "id" ) ) ; org . w3c . dom . Element usernameElement = ( ( org . w3c . dom . Element ) ( userElement . getElementsByTagName ( "username" ) . item ( 0 ) ) ) ; user . setUsername ( ( ( org . w3c . dom . Text ) ( usernameElement . getFirstChild ( ) ) ) . getData ( ) ) ; return user ; }
org . junit . Assert . assertNotNull ( user )
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . MembershipRequest newMembershipRequest = addMembershipRequest ( ) ; com . liferay . portal . kernel . model . MembershipRequest existingMembershipRequest = _persistence . findByPrimaryKey ( newMembershipRequest . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingMembershipRequest , newMembershipRequest )
testIfCustomIsFalseAndGlobalIsTrue ( ) { org . apache . cxf . message . Message message = org . easymock . EasyMock . createMock ( org . apache . cxf . message . MessageImpl . class ) ; org . easymock . EasyMock . expect ( message . getContextualProperty ( org . talend . esb . sam . agent . wiretap . WireTapHelperTest . EXTERNAL_PROPERTY_NAME ) ) . andReturn ( "false" ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( message ) ; boolean result = org . talend . esb . sam . agent . wiretap . WireTapHelper . isMessageContentToBeLogged ( message , true , true ) ; org . easymock . EasyMock . verify ( message ) ; "<AssertPlaceHolder>" ; } isMessageContentToBeLogged ( org . apache . cxf . message . Message , boolean , boolean ) { if ( ! logMessageContentOverride ) { return logMessageContent ; } java . lang . Object logMessageContentExtObj = message . getContextualProperty ( org . talend . esb . sam . agent . wiretap . WireTapHelper . EXTERNAL_PROPERTY_NAME ) ; if ( null == logMessageContentExtObj ) { return logMessageContent ; } else if ( logMessageContentExtObj instanceof java . lang . Boolean ) { return ( ( java . lang . Boolean ) ( logMessageContentExtObj ) ) . booleanValue ( ) ; } else if ( logMessageContentExtObj instanceof java . lang . String ) { java . lang . String logMessageContentExtVal = ( ( java . lang . String ) ( logMessageContentExtObj ) ) ; if ( logMessageContentExtVal . equalsIgnoreCase ( "true" ) ) { return true ; } else if ( logMessageContentExtVal . equalsIgnoreCase ( "false" ) ) { return false ; } else { return logMessageContent ; } } else { return logMessageContent ; } }
org . junit . Assert . assertEquals ( false , result )
testParseDateNode ( ) { java . util . Date actual = ( ( java . util . Date ) ( parseParamNode ( "<param><value><dateTime.iso8601>19980717T14:08:55</dateTime.iso8601></value></param>" ) ) ) ; java . util . Date expected = org . krakenapps . xmlrpc . DateUtil . create ( 1998 , 7 , 17 , 14 , 8 , 55 ) ; "<AssertPlaceHolder>" ; } create ( int , int , int , int , int , int ) { java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . set ( year , ( month - 1 ) , day , hour , minute , second ) ; calendar . set ( Calendar . MILLISECOND , 0 ) ; java . util . Date expected = calendar . getTime ( ) ; return expected ; }
org . junit . Assert . assertEquals ( expected , actual )
testDecodeSubSequence ( ) { final int start = 4 ; final int end = 14 ; final java . lang . String sequence = "QEFHRKPQQPHKDGNFGAD" ; final java . lang . String alignment = "HRK-----KDg" ; ^ 14 final java . lang . String encoding = "3M5D2M1I" ; uk . ac . ebi . interpro . scan . model . raw . alignment . AlignmentEncoder encoder = new uk . ac . ebi . interpro . scan . model . raw . alignment . CigarAlignmentEncoder ( ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . String , java . lang . String , int , int ) { if ( sequence == null ) { throw new java . lang . NullPointerException ( "Sequence<sp>must<sp>not<sp>be<sp>null" ) ; } if ( encodedAlignment == null ) { throw new java . lang . NullPointerException ( "Alignment<sp>must<sp>not<sp>be<sp>null" ) ; } if ( start < 1 ) { throw new java . lang . IllegalArgumentException ( "Start<sp>position<sp>must<sp>be<sp>1<sp>or<sp>greater" ) ; } if ( end < 1 ) { throw new java . lang . IllegalArgumentException ( "Stop<sp>position<sp>must<sp>be<sp>1<sp>or<sp>greater" ) ; } if ( start > end ) { throw new java . lang . IllegalArgumentException ( "Start<sp>position<sp>must<sp>be<sp>equal<sp>to<sp>or<sp>less<sp>than<sp>stop<sp>position" ) ; } java . lang . String sequenceRegion = sequence . substring ( ( start - 1 ) , end ) ; return decode ( sequenceRegion , encodedAlignment ) ; }
org . junit . Assert . assertEquals ( alignment , encoder . decode ( sequence , encoding , start , end ) )
testCreatePropertyOK ( ) { org . ff4j . property . util . PropertyJsonBean jsonBean = new org . ff4j . property . util . PropertyJsonBean ( new org . ff4j . property . PropertyString ( "p1" , "v1" ) ) ; "<AssertPlaceHolder>" ; } createProperty ( org . ff4j . property . util . PropertyJsonBean ) { if ( pgb == null ) return null ; return org . ff4j . property . util . PropertyFactory . createProperty ( pgb . getName ( ) , pgb . getType ( ) , pgb . getValue ( ) , pgb . getDescription ( ) , pgb . getFixedValues ( ) ) ; }
org . junit . Assert . assertNotNull ( org . ff4j . property . util . PropertyFactory . createProperty ( jsonBean ) )
testDefaultRuleObtainsOneColumn ( ) { com . eclipsesource . tabris . passepartout . FluidGridData data = new com . eclipsesource . tabris . passepartout . FluidGridData ( ) ; com . eclipsesource . tabris . passepartout . Rule rule = data . getRules ( ) . get ( 0 ) ; com . eclipsesource . tabris . passepartout . internal . instruction . ColumnsInstruction instruction = ( ( com . eclipsesource . tabris . passepartout . internal . instruction . ColumnsInstruction ) ( rule . getInstructions ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } getColumns ( ) { return columns ; }
org . junit . Assert . assertEquals ( 1 , instruction . getColumns ( ) )
testInitiateDownloadSingleSampleFile ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionSampleDataFileKey businessObjectDefinitionSampleDataFileKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionSampleDataFileKey ( BDEF_NAMESPACE , BDEF_NAME , DIRECTORY_PATH , FILE_NAME ) ; org . finra . herd . model . api . xml . DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationRequest request = new org . finra . herd . model . api . xml . DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationRequest ( businessObjectDefinitionSampleDataFileKey ) ; org . finra . herd . model . api . xml . DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationResponse response = new org . finra . herd . model . api . xml . DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationResponse ( businessObjectDefinitionSampleDataFileKey , S3_BUCKET_NAME , AWS_ASSUMED_ROLE_ACCESS_KEY , AWS_ASSUMED_ROLE_SECRET_KEY , AWS_ASSUMED_ROLE_SESSION_TOKEN , AWS_ASSUMED_ROLE_SESSION_EXPIRATION_TIME , AWS_PRE_SIGNED_URL ) ; when ( uploadDownloadService . initiateDownloadSingleSampleFile ( request ) ) . thenReturn ( response ) ; org . finra . herd . model . api . xml . DownloadBusinessObjectDefinitionSampleDataFileSingleInitiationResponse result = uploadDownloadRestController . initiateDownloadSingleSampleFile ( request ) ; verify ( uploadDownloadService ) . initiateDownloadSingleSampleFile ( request ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( response , result )
isOnlyNameChanged_False ( ) { org . oscm . internal . vo . VOTriggerDefinition voTriggerDefinition = new org . oscm . internal . vo . VOTriggerDefinition ( ) ; voTriggerDefinition . setName ( "name1" ) ; voTriggerDefinition . setTarget ( "target" ) ; voTriggerDefinition . setTargetType ( TriggerTargetType . WEB_SERVICE ) ; voTriggerDefinition . setType ( TriggerType . ACTIVATE_SERVICE ) ; voTriggerDefinition . setSuspendProcess ( true ) ; org . oscm . domobjects . TriggerDefinition triggerDefinition = new org . oscm . domobjects . TriggerDefinition ( ) ; triggerDefinition . setName ( "name2" ) ; triggerDefinition . setTarget ( "target" ) ; triggerDefinition . setTargetType ( TriggerTargetType . WEB_SERVICE ) ; triggerDefinition . setType ( TriggerType . ACTIVATE_SERVICE ) ; triggerDefinition . setSuspendProcess ( false ) ; boolean result = org . oscm . triggerservice . assembler . TriggerDefinitionAssembler . isOnlyNameChanged ( voTriggerDefinition , triggerDefinition ) ; "<AssertPlaceHolder>" ; } isOnlyNameChanged ( org . oscm . internal . vo . VOTriggerDefinition , org . oscm . domobjects . TriggerDefinition ) { if ( ! ( vo . getTarget ( ) . equals ( triggerDefinition . getTarget ( ) ) ) ) { return false ; } if ( ! ( vo . getTargetType ( ) . equals ( triggerDefinition . getTargetType ( ) ) ) ) { return false ; } if ( ! ( vo . getType ( ) . equals ( triggerDefinition . getType ( ) ) ) ) { return false ; } if ( ( ! ( vo . isSuspendProcess ( ) ) ) && ( triggerDefinition . isSuspendProcess ( ) ) ) { return false ; } if ( ( vo . isSuspendProcess ( ) ) && ( ! ( triggerDefinition . isSuspendProcess ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( result )
testLogMessageSubstringFilter ( ) { org . opennms . web . event . filter . LogMessageSubstringFilter filter = new org . opennms . web . event . filter . LogMessageSubstringFilter ( "is<sp>a<sp>test" ) ; org . opennms . web . event . Event [ ] events = getMatchingDaoEvents ( filter ) ; "<AssertPlaceHolder>" ; } getMatchingDaoEvents ( org . opennms . web . filter . Filter [ ] ) { return m_daoEventRepo . getMatchingEvents ( org . opennms . web . event . filter . WebEventRepositoryFilterIT . getCriteria ( filters ) ) ; }
org . junit . Assert . assertEquals ( 1 , events . length )
testEndNoneEventHashCode ( ) { org . kie . workbench . common . stunner . bpmn . definition . BusinessRuleTask a = new org . kie . workbench . common . stunner . bpmn . definition . BusinessRuleTask ( ) ; org . kie . workbench . common . stunner . bpmn . definition . BusinessRuleTask b = new org . kie . workbench . common . stunner . bpmn . definition . BusinessRuleTask ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( getPath ( ) ) != null ? getPath ( ) . hashCode ( ) : 0 ; }
org . junit . Assert . assertEquals ( a . hashCode ( ) , b . hashCode ( ) )
isLesserThanOrEqualToTest ( ) { java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > times = new java . util . ArrayList ( getTimes ( ) ) ; times . add ( timeFactory . create ( 30 , Units . HOUR ) ) ; java . util . List < javax . measure . Quantity < javax . measure . quantity . Time > > list = times . stream ( ) . filter ( tec . uom . se . function . QuantityFunctions . isLesserThanOrEqualTo ( 15 ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } isLesserThanOrEqualTo ( java . lang . Number ) { return ( q ) -> ( q . getValue ( ) . doubleValue ( ) ) <= ( value . doubleValue ( ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , java . lang . Integer . valueOf ( list . size ( ) ) )
testGetKey ( ) { for ( final java . lang . Character symbol : com . dell . mensa . impl . generic . EdgeTest . symbols ) { for ( final int state : com . dell . mensa . impl . generic . EdgeTest . states ) { final com . dell . mensa . impl . generic . Edge < java . lang . Character > edge = com . dell . mensa . impl . generic . EdgeTest . createEdge ( symbol , state ) ; "<AssertPlaceHolder>" ; } } } getSymbol ( ) { return symbol ; }
org . junit . Assert . assertEquals ( symbol , edge . getSymbol ( ) )
test ( ) { org . ebayopensource . fido . uaf . msg . AuthenticationRequest authRequest = gson . fromJson ( getTestAuthRequest ( ) , org . ebayopensource . fido . uaf . msg . AuthenticationRequest . class ) ; "<AssertPlaceHolder>" ; logger . info ( gson . toJson ( authRequest ) ) ; }
org . junit . Assert . assertNotNull ( authRequest )
constructor ( ) { Counter inc = new Counter ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( inc )
testCEFFormatting ( ) { final java . lang . String jsonInput = "{\"perpetratorID\":\"per|son\",\"perpetratorDN\":\"cn=per|son,o=org\"," + ( ( ( "\"perpetratorLdapProfile\":\"default\",\"sourceAddress\":\"2001:DB8:D:B8:35cc::/64\",\"sourceHost\":\"ws31222\"," + "\"type\":\"USER\",\"eventCode\":\"ACTIVATE_USER\",\"guid\":\"16ee0bf8-b0c9-41d7-8c24-b40110fc727e\"," ) + "\"timestamp\":\"2000-01-01T00:00:00Z\",\"message\":\"message<sp>pipe|Escape,<sp>slash\\\\Escape,<sp>equal=Escape,<sp>\\nsecondLine\"," ) + "\"xdasTaxonomy\":\"XDAS_AE_CREATE_SESSION\",\"xdasOutcome\":\"XDAS_OUT_SUCCESS\"}" ) ; final password . pwm . svc . event . UserAuditRecord auditRecord = password . pwm . util . java . JsonUtil . deserialize ( jsonInput , password . pwm . svc . event . UserAuditRecord . class ) ; final java . lang . String expectedOutput = "CEF:0|PWM|PWM|v<sp>b0<sp>r0|ACTIVATE_USER|Activate<sp>Account|Medium|<sp>type=USER<sp>eventCode=ACTIVATE_USER<sp>timestamp=" + ( ( "2000-01-01T00:00:00Z" + "<sp>message=message<sp>pipe\\|Escape,<sp>slash\\\\Escape,<sp>equal\\=Escape,<sp>\\nsecondLine" ) + "<sp>perpetratorID=per\\|son<sp>perpetratorDN=cn\\=per\\|son,o\\=org<sp>sourceAddress=2001:DB8:D:B8:35cc::/64<sp>sourceHost=ws31222" ) ; final password . pwm . svc . event . CEFAuditFormatter cefAuditFormatter = new password . pwm . svc . event . CEFAuditFormatter ( ) ; final password . pwm . PwmApplication pwmApplication = org . mockito . Mockito . mock ( password . pwm . PwmApplication . class ) ; org . mockito . Mockito . when ( pwmApplication . getConfig ( ) ) . thenReturn ( new password . pwm . config . Configuration ( password . pwm . config . stored . StoredConfigurationImpl . newStoredConfiguration ( ) ) ) ; final java . lang . String output = cefAuditFormatter . convertAuditRecordToMessage ( pwmApplication , auditRecord ) ; "<AssertPlaceHolder>" ; } convertAuditRecordToMessage ( password . pwm . PwmApplication , password . pwm . svc . event . AuditRecord ) { final password . pwm . config . Configuration configuration = pwmApplication . getConfig ( ) ; final int maxLength = java . lang . Integer . parseInt ( configuration . readAppProperty ( AppProperty . AUDIT_SYSLOG_MAX_MESSAGE_LENGTH ) ) ; java . lang . String jsonValue = "" ; final java . lang . StringBuilder message = new java . lang . StringBuilder ( ) ; message . append ( PwmConstants . PWM_APP_NAME ) ; message . append ( "<sp>" ) ; jsonValue = password . pwm . util . java . JsonUtil . serialize ( auditRecord ) ; if ( ( ( message . length ( ) ) + ( jsonValue . length ( ) ) ) <= maxLength ) { message . append ( jsonValue ) ; } else { final password . pwm . svc . event . AuditRecord inputRecord = password . pwm . util . java . JsonUtil . cloneUsingJson ( auditRecord , auditRecord . getClass ( ) ) ; inputRecord . message = ( ( inputRecord . message ) == null ) ? "" : inputRecord . message ; inputRecord . narrative = ( ( inputRecord . narrative ) == null ) ? "" : inputRecord . narrative ; final java . lang . String truncateMessage = configuration . readAppProperty ( AppProperty . AUDIT_SYSLOG_TRUNCATE_MESSAGE ) ; final password . pwm . svc . event . AuditRecord copiedRecord = password . pwm . util . java . JsonUtil . cloneUsingJson ( auditRecord , auditRecord . getClass ( ) ) ; copiedRecord . message = "" ; copiedRecord . narrative = "" ; final int shortenedMessageLength = ( ( message . length ( ) ) + ( password . pwm . util . java . JsonUtil . serialize ( copiedRecord ) . length ( ) ) ) + ( truncateMessage . length ( ) ) ; final int maxMessageAndNarrativeLength = maxLength - ( shortenedMessageLength + ( ( truncateMessage . length ( ) ) * 2 ) ) ; int maxMessageLength = inputRecord . getMessage ( ) . length ( ) ; int maxNarrativeLength = inputRecord . getNarrative ( ) . length ( ) ; { int top = maxMessageAndNarrativeLength ; while ( ( maxMessageLength + maxNarrativeLength ) > maxMessageAndNarrativeLength ) { top -- ; maxMessageLength = java . lang . Math . min ( maxMessageLength , top ) ; maxNarrativeLength = java . lang . Math . min ( maxNarrativeLength , top ) ; } } copiedRecord . message = ( ( inputRecord . getMessage ( ) . length ( ) ) > maxMessageLength ) ? ( inputRecord . message . substring ( 0 , maxMessageLength ) ) + truncateMessage : inputRecord . message ; copiedRecord . narrative = ( ( inputRecord . getNarrative ( ) . length ( ) ) > maxNarrativeLength ) ? ( inputRecord . narrative . substring ( 0 , maxNarrativeLength ) ) + truncateMessage : inputRecord . narrative ; message . append ( password . pwm . util . java . JsonUtil . serialize ( copiedRecord ) ) ; } return message . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedOutput , output )
testResolvesLocationUriThenTopic ( ) { java . lang . String location = "a<sp>location" ; org . mockito . Mockito . when ( topicStore . topicFor ( "dbpedia" , location ) ) . thenReturn ( com . metabroadcast . common . base . Maybe . just ( testTopic ) ) ; com . google . common . base . Optional < org . atlasapi . media . entity . Topic > resolved = eventsUtil . createOrResolveVenue ( location ) ; org . mockito . Mockito . verify ( topicStore ) . topicFor ( "dbpedia" , location ) ; "<AssertPlaceHolder>" ; } get ( ) { try { return httpClient . get ( new com . metabroadcast . common . http . SimpleHttpRequest < nu . xom . Document > ( feedUrl , TRANSFORMER ) ) ; } catch ( java . lang . Exception e ) { throw com . google . api . client . repackaged . com . google . common . base . Throwables . propagate ( e ) ; } }
org . junit . Assert . assertEquals ( testTopic , resolved . get ( ) )
testGetPrivateUrlUserFromRoleAssignmentAndAssigneeSuccess ( ) { edu . harvard . iq . dataverse . authorization . DataverseRole aRole = null ; edu . harvard . iq . dataverse . authorization . users . PrivateUrlUser privateUrlUser = new edu . harvard . iq . dataverse . authorization . users . PrivateUrlUser ( 42 ) ; edu . harvard . iq . dataverse . authorization . RoleAssignee assignee = privateUrlUser ; edu . harvard . iq . dataverse . DvObject dataset = new edu . harvard . iq . dataverse . Dataset ( ) ; dataset . setId ( 42L ) ; java . lang . String privateUrlToken = "cd71e9d7-73a7-4ec8-b890-3d00499e8693" ; edu . harvard . iq . dataverse . RoleAssignment assignment = new edu . harvard . iq . dataverse . RoleAssignment ( aRole , assignee , dataset , privateUrlToken ) ; edu . harvard . iq . dataverse . authorization . users . PrivateUrlUser privateUrl = edu . harvard . iq . dataverse . privateurl . PrivateUrlUtil . getPrivateUrlUserFromRoleAssignment ( assignment , assignee ) ; "<AssertPlaceHolder>" ; } getPrivateUrlUserFromRoleAssignment ( edu . harvard . iq . dataverse . RoleAssignment , edu . harvard . iq . dataverse . authorization . RoleAssignee ) { if ( roleAssignment != null ) { if ( roleAssignee instanceof edu . harvard . iq . dataverse . authorization . users . PrivateUrlUser ) { return ( ( edu . harvard . iq . dataverse . authorization . users . PrivateUrlUser ) ( roleAssignee ) ) ; } } return null ; }
org . junit . Assert . assertNotNull ( privateUrl )
trimGenericsIfNested_A$String_argNull ( ) { java . lang . String returnTypeDef = null ; java . lang . String actual = org . junithelper . core . extractor . MethodMetaExtractor . trimGenericsIfNested ( returnTypeDef ) ; java . lang . String expected = null ; "<AssertPlaceHolder>" ; } trimGenericsIfNested ( java . lang . String ) { if ( returnTypeDef == null ) { return null ; } boolean isInsideOfGeneric = false ; boolean hasNestedGenerics = false ; int len = returnTypeDef . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = returnTypeDef . charAt ( i ) ; if ( isInsideOfGeneric ) { if ( c == '<' ) { hasNestedGenerics = true ; break ; } if ( c == '>' ) { isInsideOfGeneric = false ; } } else { if ( c == '<' ) { isInsideOfGeneric = true ; } if ( c == '>' ) { isInsideOfGeneric = false ; } } } if ( hasNestedGenerics ) { return returnTypeDef . replaceFirst ( RegExp . Generics , StringValue . Empty ) . replaceAll ( "<" , StringValue . Empty ) . replaceAll ( ">" , StringValue . Empty ) ; } return returnTypeDef ; }
org . junit . Assert . assertEquals ( expected , actual )
should_collapse_simple_leaf_bwd ( ) { int k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( k , "AAATT" , 1 , 10 , false ) ) ; input . add ( KPN ( k , "ATTGC" , 3 , 12 , false ) ) ; input . add ( KPN ( k , "CGATT" , 1 , 10 , false ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 0 ) , input . get ( 1 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 2 ) , input . get ( 1 ) ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > result = au . edu . wehi . idsv . debruijn . positional . CollapseIteratorTest . simplify ( go ( k , 100 , 100 , input ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
testExchangePartitionsYearAndDaySetInPartSpec ( ) { java . util . Map < java . lang . String , java . lang . String > partitionSpecs = new java . util . HashMap ( ) ; partitionSpecs . put ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . YEAR_COL_NAME , "2017" ) ; partitionSpecs . put ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . MONTH_COL_NAME , "" ) ; partitionSpecs . put ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . DAY_COL_NAME , "22" ) ; try { client . exchange_partitions ( partitionSpecs , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . sourceTable . getDbName ( ) , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . sourceTable . getTableName ( ) , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . destTable . getDbName ( ) , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . destTable . getTableName ( ) ) ; org . junit . Assert . fail ( "MetaException<sp>should<sp>have<sp>been<sp>thrown." ) ; } catch ( org . apache . hadoop . hive . metastore . api . MetaException e ) { } checkRemainingPartitions ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . sourceTable , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . destTable , com . google . common . collect . Lists . newArrayList ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . partitions [ 0 ] , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . partitions [ 1 ] , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . partitions [ 2 ] , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . partitions [ 3 ] , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . partitions [ 4 ] ) ) ; java . util . List < org . apache . hadoop . hive . metastore . api . Partition > partsInDestTable = client . listPartitions ( org . apache . hadoop . hive . metastore . client . TestExchangePartitions . destTable . getDbName ( ) , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . destTable . getTableName ( ) , org . apache . hadoop . hive . metastore . client . TestExchangePartitions . MAX ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { com . google . common . base . Preconditions . checkNotNull ( getPath ( ) ) ; try { org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( getPath ( ) . toUri ( ) , org . apache . hadoop . hive . ql . session . SessionState . getSessionConf ( ) ) ; return ( ! ( fs . exists ( getPath ( ) ) ) ) || ( ( fs . listStatus ( getPath ( ) , FileUtils . HIDDEN_FILES_PATH_FILTER ) . length ) == 0 ) ; } catch ( java . io . IOException e ) { throw new org . apache . hadoop . hive . ql . metadata . HiveException ( e ) ; } }
org . junit . Assert . assertTrue ( partsInDestTable . isEmpty ( ) )
testGetLanguagesWithOffsetAndLimit ( ) { this . repository . deleteAll ( ) ; fillRepositoryRandom ( 6 , ORG2 ) ; java . util . List < java . lang . String > languageNames = fillRepository ( ORG1 ) ; java . util . List < org . zalando . catwatch . backend . model . Language > languageList = generateLanguageList ( languageNames ) ; int limit = 6 ; int offset = 0 ; java . lang . String url = org . zalando . catwatch . backend . util . TestUtils . createAbsoluteLanguagesUrl ( this . base . toString ( ) , ORG1 , limit , offset , null ) ; org . springframework . http . ResponseEntity < org . zalando . catwatch . backend . model . Language [ ] > response = template . getForEntity ( url , org . zalando . catwatch . backend . model . Language [ ] . class ) ; org . zalando . catwatch . backend . model . Language [ ] langResponse = response . getBody ( ) ; "<AssertPlaceHolder>" ; checkLanguages ( langResponse , languageList , offset ) ; offset += limit ; limit = 3 ; url = org . zalando . catwatch . backend . util . TestUtils . createAbsoluteLanguagesUrl ( this . base . toString ( ) , ORG1 , limit , offset , null ) ; response = template . getForEntity ( url , org . zalando . catwatch . backend . model . Language [ ] . class ) ; langResponse = response . getBody ( ) ; checkLanguages ( langResponse , languageList , offset ) ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "class<sp>Language<sp>{\n" ) ; sb . append ( "<sp>name:<sp>" ) . append ( name ) . append ( "\n" ) ; sb . append ( "<sp>projectsCount:<sp>" ) . append ( projectsCount ) . append ( "\n" ) ; sb . append ( "<sp>percentage:<sp>" ) . append ( percentage ) . append ( "\n" ) ; sb . append ( "}\n" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertThat ( langResponse . length , org . hamcrest . Matchers . equalTo ( limit ) )
checkSupportsAllElements ( ) { "<AssertPlaceHolder>" ; } supports ( java . lang . Class ) { return ( super . supports ( clazz ) ) || ( clazz . isEnum ( ) ) ; }
org . junit . Assert . assertTrue ( provider . supports ( element ) )
when_shipmentroute_loadAtAct1ShouldBe10 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( shipment_route ) , java . util . Collections . < com . graphhopper . jsprit . core . algorithm . state . Job > emptyList ( ) ) ; com . graphhopper . jsprit . core . algorithm . state . Capacity atAct1 = stateManager . getActivityState ( shipment_route . getActivities ( ) . get ( 0 ) , InternalStates . LOAD , com . graphhopper . jsprit . core . algorithm . state . Capacity . class ) ; "<AssertPlaceHolder>" ; } get ( com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute ) { return com . graphhopper . jsprit . core . algorithm . state . Arrays . asList ( route . getVehicle ( ) ) ; }
org . junit . Assert . assertEquals ( 10 , atAct1 . get ( 0 ) )
supports_create_domain ( ) { when ( update . getAction ( ) ) . thenReturn ( Action . CREATE ) ; when ( update . getType ( ) ) . thenReturn ( ObjectType . DOMAIN ) ; "<AssertPlaceHolder>" ; } supports ( net . ripe . db . whois . update . domain . PreparedUpdate ) { return ( update . getAction ( ) . equals ( Action . CREATE ) ) && ( ( update . getType ( ) . equals ( ObjectType . ROUTE ) ) || ( update . getType ( ) . equals ( ObjectType . ROUTE6 ) ) ) ; }
org . junit . Assert . assertThat ( subject . supports ( update ) , is ( true ) )
testCacheHit ( ) { when ( mMemoryCache . get ( mPostprocessedBitmapCacheKey ) ) . thenReturn ( mImageRef2Clone ) ; mMemoryCacheProducer . produceResults ( mConsumer , mProducerContext ) ; verify ( mInputProducer , never ( ) ) . produceResults ( any ( com . facebook . imagepipeline . producers . Consumer . class ) , any ( com . facebook . imagepipeline . producers . ProducerContext . class ) ) ; verify ( mProducerListener ) . onProducerStart ( mRequestId , com . facebook . imagepipeline . producers . PostprocessedBitmapMemoryCacheProducerTest . PRODUCER_NAME ) ; verify ( mProducerListener ) . onProducerFinishWithSuccess ( mRequestId , com . facebook . imagepipeline . producers . PostprocessedBitmapMemoryCacheProducerTest . PRODUCER_NAME , mExtraOnHit ) ; verify ( mProducerListener ) . onUltimateProducerReached ( mRequestId , com . facebook . imagepipeline . producers . PostprocessedBitmapMemoryCacheProducerTest . PRODUCER_NAME , true ) ; verify ( mConsumer ) . onNewResult ( mImageRef2Clone , Consumer . IS_LAST ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return ( com . facebook . common . references . CloseableReference . isValid ( mPooledByteBufferRef ) ) || ( ( mInputStreamSupplier ) != null ) ; }
org . junit . Assert . assertFalse ( mImageRef2Clone . isValid ( ) )
getFunction_builtin_list_members ( ) { com . psddev . dari . util . List < java . lang . String > inputs = com . psddev . dari . util . Arrays . asList ( "1" , "2" , "3" ) ; com . psddev . dari . util . List < java . lang . Integer > expect = com . psddev . dari . util . Arrays . asList ( 1 , 2 , 3 ) ; com . psddev . dari . util . TypeReference < com . psddev . dari . util . List < java . lang . Integer > > typeref = new com . psddev . dari . util . TypeReference < com . psddev . dari . util . List < java . lang . Integer > > ( ) { } ; com . psddev . dari . util . ConversionFunction < java . lang . Object , java . lang . Object > function = converter . getFunction ( java . lang . Object . class , typeref . getType ( ) ) ; java . lang . Object result = function . convert ( converter , typeref . getType ( ) , inputs ) ; com . psddev . dari . util . List < java . lang . Integer > output = ( ( com . psddev . dari . util . List < java . lang . Integer > ) ( result ) ) ; "<AssertPlaceHolder>" ; } getType ( ) { com . psddev . dari . db . ObjectType type = getDatabase ( ) . getEnvironment ( ) . getTypeById ( getTypeId ( ) ) ; if ( type == null ) { for ( java . lang . Object object : linkedObjects . values ( ) ) { if ( ( object instanceof com . psddev . dari . db . ObjectType ) && ( getId ( ) . equals ( getTypeId ( ) ) ) ) { type = ( ( com . psddev . dari . db . ObjectType ) ( object ) ) ; type . setObjectClassName ( com . psddev . dari . db . ObjectType . class . getName ( ) ) ; type . initialize ( ) ; } break ; } } return type ; }
org . junit . Assert . assertEquals ( expect , output )
shouldProducePlanWhenFullTextSearchingTableWithAtLeastOneSearchableColumn ( ) { schemata = schemataBuilder . addTable ( "someTable" , "column1" , "column2" , "column3" ) . makeSearchable ( "someTable" , "column1" ) . build ( ) ; query = builder . select ( "column1" , "column4" ) . from ( "someTable" ) . where ( ) . search ( "someTable" , "term1" ) . end ( ) . query ( ) ; initQueryContext ( ) ; plan = planner . createPlan ( queryContext , query ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { for ( org . modeshape . schematic . SchemaLibrary . Problem problem : problems ) { if ( ( problem . getType ( ) ) == ( SchemaLibrary . ProblemType . ERROR ) ) return true ; } return false ; }
org . junit . Assert . assertThat ( problems . hasErrors ( ) , org . hamcrest . core . Is . is ( true ) )
testExistsQuery ( ) { com . liferay . portal . search . query . ExistsQuery existsQuery = com . liferay . portal . search . query . test . QueriesInstantiationTest . _queries . exists ( "field" ) ; "<AssertPlaceHolder>" ; } exists ( java . lang . String ) { return new com . liferay . portal . search . internal . query . ExistsQueryImpl ( field ) ; }
org . junit . Assert . assertNotNull ( existsQuery )
testJsonSerialization ( ) { org . batfish . datamodel . collections . NodeInterfacePair nip = new org . batfish . datamodel . collections . NodeInterfacePair ( "host" , "iface" ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( nip , org . batfish . datamodel . collections . NodeInterfacePair . class ) , org . hamcrest . Matchers . equalTo ( nip ) )
testGetStorageUnitNotificationRegistrationsByNamespace ( ) { org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationKeys storageUnitNotificationRegistrationKeys = new org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationKeys ( notificationRegistrationDaoTestHelper . getExpectedNotificationRegistrationKeys ( ) ) ; when ( storageUnitNotificationRegistrationService . getStorageUnitNotificationRegistrationsByNamespace ( org . finra . herd . rest . NAMESPACE ) ) . thenReturn ( storageUnitNotificationRegistrationKeys ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationKeys resultStorageUnitNotificationRegistrationKeys = storageUnitNotificationRegistrationRestController . getStorageUnitNotificationRegistrationsByNamespace ( org . finra . herd . rest . NAMESPACE ) ; verify ( storageUnitNotificationRegistrationService ) . getStorageUnitNotificationRegistrationsByNamespace ( org . finra . herd . rest . NAMESPACE ) ; verifyNoMoreInteractions ( storageUnitNotificationRegistrationService ) ; "<AssertPlaceHolder>" ; } getStorageUnitNotificationRegistrationsByNamespace ( java . lang . String ) { java . lang . String namespaceLocal = namespace ; org . springframework . util . Assert . hasText ( namespaceLocal , "A<sp>namespace<sp>must<sp>be<sp>specified." ) ; namespaceLocal = namespaceLocal . trim ( ) ; namespaceDaoHelper . getNamespaceEntity ( namespaceLocal ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationKeys storageUnitNotificationKeys = new org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationKeys ( ) ; storageUnitNotificationKeys . getStorageUnitNotificationRegistrationKeys ( ) . addAll ( storageUnitNotificationRegistrationDao . getStorageUnitNotificationRegistrationKeysByNamespace ( namespaceLocal ) ) ; return storageUnitNotificationKeys ; }
org . junit . Assert . assertEquals ( storageUnitNotificationRegistrationKeys , resultStorageUnitNotificationRegistrationKeys )
getName ( ) { setUp ( ) ; "<AssertPlaceHolder>" ; System . out . println ( ( "ctx<sp>" + ( ctx ) ) ) ; tearDown ( ) ; } setUp ( ) { super . setUp ( ) ; }
org . junit . Assert . assertNotNull ( ctx )
should_pass ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testDelete ( ) { target . path ( "{name}" ) . resolveTemplate ( "name" , "Howard" ) . request ( ) . delete ( ) ; org . wildfly . samples . javaee7 . arquillian . Employee [ ] list = target . request ( ) . get ( org . wildfly . samples . javaee7 . arquillian . Employee [ ] . class ) ; "<AssertPlaceHolder>" ; } get ( int ) { return baseArgs . get ( index ) ; }
org . junit . Assert . assertEquals ( 3 , list . length )
testClientConsumer ( ) { org . apache . cxf . dosgi . samples . soap . Task task = taskService . get ( 1 ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return title ; }
org . junit . Assert . assertEquals ( "test" , task . getTitle ( ) )
metadata_xmlAssociationEndRolefalse ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/00_$metadata.xml" ; final java . lang . String filename = "/00_$metadata_associaton_role_attr_notexist.xml" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . RESOURCE_PATH ) + filename ) ) ; java . io . File file = new java . io . File ( fileUrl . getPath ( ) ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( file ) ; com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner testBarRunner = new com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner ( ) ; boolean res = testBarRunner . registUserSchema ( entryName , fis , null ) ; "<AssertPlaceHolder>" ; return ; } catch ( com . fujitsu . dc . core . DcCoreException dce ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } catch ( java . lang . Exception ex ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } org . junit . Assert . fail ( "DcCoreException" ) ; } registUserSchema ( java . lang . String , java . io . InputStream , com . fujitsu . dc . core . model . DavCmp ) { org . odata4j . edm . EdmDataServices metadata = null ; try { java . io . InputStreamReader isr = new java . io . InputStreamReader ( new org . apache . commons . io . input . CloseShieldInputStream ( inputStream ) ) ; org . odata4j . stax2 . XMLFactoryProvider2 provider = org . odata4j . stax2 . staximpl . StaxXMLFactoryProvider2 . getInstance ( ) ; org . odata4j . stax2 . XMLInputFactory2 factory = provider . newXMLInputFactory2 ( ) ; org . odata4j . stax2 . XMLEventReader2 reader = factory . createXMLEventReader ( isr ) ; com . fujitsu . dc . core . odata . DcEdmxFormatParser parser = new com . fujitsu . dc . core . odata . DcEdmxFormatParser ( ) ; metadata = parser . parseMetadata ( reader ) ; } catch ( java . lang . Exception ex ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( ex . getMessage ( ) ) ) , ex . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } catch ( java . lang . StackOverflowError tw ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( tw . getMessage ( ) ) ) , tw . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } try { createComplexTypes ( metadata , davCmp ) ; createEntityTypes ( metadata , davCmp ) ; createAssociations ( metadata , davCmp ) ; } catch ( com . fujitsu . dc . core . DcCoreException e ) { writeOutputStream ( true , "PL-BI-1004" , entryName , e . getMessage ( ) ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "DcCoreException:<sp>" + ( e . getMessage ( ) ) ) ) ; return false ; } catch ( java . lang . Exception e ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "Regist<sp>Entity<sp>Error:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2003" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( res )
testCrear ( ) { log . debug ( "test<sp>crear<sp>InformeMensual" ) ; mx . edu . um . mateo . general . model . Usuario colportor = obtieneColportor ( ) ; mx . edu . um . mateo . colportor . model . InformeMensual informe = new mx . edu . um . mateo . colportor . model . InformeMensual ( ( ( mx . edu . um . mateo . colportor . model . Colportor ) ( colportor ) ) , new java . util . Date ( ) , mx . edu . um . mateo . general . utils . Constantes . STATUS_ACTIVO , colportor , new java . util . Date ( ) ) ; currentSession ( ) . save ( informe ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( informe . getId ( ) )
testIsWicketJavaElement ( ) { long start = java . lang . System . nanoTime ( ) ; final java . util . List < org . eclipse . jdt . internal . core . JavaElement > wicketComponentTypes = qwickie . util . TypeHelper . getWicketComponentTypes ( javaFile ) ; try { "<AssertPlaceHolder>" ; } catch ( org . eclipse . jdt . core . JavaModelException e ) { } System . out . println ( ( "testIsWicketJavaElement:\t" + ( ( java . lang . System . nanoTime ( ) ) - start ) ) ) ; } isWicketJavaElement ( org . eclipse . jdt . core . IJavaElement ) { org . eclipse . core . runtime . Assert . isNotNull ( javaElement ) ; if ( ( javaElement != null ) && ( javaElement instanceof org . eclipse . jdt . internal . core . NamedMember ) ) { if ( javaElement . getElementName ( ) . equals ( DocumentHelper . GET_STRING ) ) { return true ; } else if ( ( javaElement . getElementType ( ) ) == ( org . eclipse . jdt . core . IJavaElement . TYPE ) ) { final org . eclipse . jdt . internal . core . NamedMember method = ( ( org . eclipse . jdt . internal . core . NamedMember ) ( javaElement ) ) ; final org . eclipse . jdt . core . IType type = method . getTypeRoot ( ) . findPrimaryType ( ) ; return qwickie . util . TypeHelper . hierarchyContainsComponent ( type ) ; } else if ( ( javaElement . getElementType ( ) ) == ( org . eclipse . jdt . core . IJavaElement . METHOD ) ) { return qwickie . util . TypeHelper . isWicketComponent ( javaElement ) ; } return qwickie . util . TypeHelper . isWicketJavaElement ( javaElement . getParent ( ) ) ; } return false ; }
org . junit . Assert . assertTrue ( qwickie . util . TypeHelper . isWicketJavaElement ( wicketComponentTypes . get ( 0 ) ) )
getException_check_argument ( ) { final com . navercorp . pinpoint . web . vo . callstacks . RecordFactory factory = newRecordFactory ( ) ; com . navercorp . pinpoint . common . server . bo . SpanBo spanBo = new com . navercorp . pinpoint . common . server . bo . SpanBo ( ) ; spanBo . setTransactionId ( new com . navercorp . pinpoint . common . util . TransactionId ( "test" , 0 , 0 ) ) ; spanBo . setExceptionInfo ( 1 , null ) ; com . navercorp . pinpoint . web . calltree . span . Align align = new com . navercorp . pinpoint . web . calltree . span . SpanAlign ( spanBo ) ; com . navercorp . pinpoint . web . vo . callstacks . Record exceptionRecord = factory . getException ( 0 , 0 , align ) ; "<AssertPlaceHolder>" ; } getArguments ( ) { if ( ( targetMethod . getParameterTypes ( ) . length ) == 0 ) { return "null" ; } return "$args" ; }
org . junit . Assert . assertNotNull ( exceptionRecord . getArguments ( ) )
testName ( ) { com . sap . core . odata . ref . model . Building build1 = new com . sap . core . odata . ref . model . Building ( 1 , com . sap . core . odata . ref . model . BuildingTest . VALUE_NAME ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( com . sap . core . odata . ref . model . BuildingTest . VALUE_NAME , build1 . getName ( ) )
get ( ) { final org . graylog . plugins . metrics . console . providers . ConsoleReporterProvider provider = new org . graylog . plugins . metrics . console . providers . ConsoleReporterProvider ( new org . graylog . plugins . metrics . console . MetricsConsoleReporterConfiguration ( ) , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . codahale . metrics . ConsoleReporter reporter = provider . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { final org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider provider = new org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider ( new org . graylog . plugins . metrics . jmx . MetricsJmxReporterConfiguration ( ) , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . codahale . metrics . JmxReporter reporter = provider . get ( ) ; org . junit . Assert . assertNotNull ( reporter ) ; }
org . junit . Assert . assertNotNull ( reporter )
testGenerateAvro2 ( ) { try { java . lang . String filename = "people.avro" ; edu . isi . karma . rdf . TestAvroRDFGenerator . logger . info ( ( "Loading<sp>avro<sp>file:<sp>" + filename ) ) ; java . io . File tempAvroOutput = java . io . File . createTempFile ( "testgenerateavro2" , "avro" ) ; tempAvroOutput . deleteOnExit ( ) ; java . io . FileOutputStream fos = new java . io . FileOutputStream ( tempAvroOutput ) ; edu . isi . karma . kr2rml . writer . AvroKR2RMLRDFWriter arvowriter = new edu . isi . karma . kr2rml . writer . AvroKR2RMLRDFWriter ( fos ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; java . io . PrintWriter pw = new java . io . PrintWriter ( sw ) ; edu . isi . karma . kr2rml . writer . JSONKR2RMLRDFWriter jsonwriter = new edu . isi . karma . kr2rml . writer . JSONKR2RMLRDFWriter ( pw ) ; java . util . List < edu . isi . karma . kr2rml . writer . KR2RMLRDFWriter > writers = new java . util . LinkedList ( ) ; writers . add ( arvowriter ) ; writers . add ( jsonwriter ) ; edu . isi . karma . rdf . RDFGeneratorRequest request = new edu . isi . karma . rdf . RDFGeneratorRequest ( "people-avro-model" , filename ) ; request . setInputFile ( new java . io . File ( getTestResource ( filename ) . toURI ( ) ) ) ; request . setAddProvenance ( false ) ; request . setDataType ( InputType . AVRO ) ; request . addWriters ( writers ) ; request . setContextParameters ( edu . isi . karma . webserver . ContextParametersRegistry . getInstance ( ) . getDefault ( ) ) ; rdfGen . generateRDF ( request ) ; fos . flush ( ) ; fos . close ( ) ; org . apache . avro . file . DataFileReader < java . lang . Void > schemareader = new org . apache . avro . file . DataFileReader ( tempAvroOutput , new org . apache . avro . generic . GenericDatumReader < java . lang . Void > ( ) ) ; org . apache . avro . Schema schema = schemareader . getSchema ( ) ; org . apache . avro . io . DatumReader < org . apache . avro . generic . GenericRecord > datumReader = new org . apache . avro . generic . GenericDatumReader ( schema ) ; org . apache . avro . file . DataFileReader < org . apache . avro . generic . GenericRecord > reader = new org . apache . avro . file . DataFileReader ( tempAvroOutput , datumReader ) ; int count = 0 ; while ( reader . hasNext ( ) ) { reader . next ( ) ; count ++ ; } reader . close ( ) ; schemareader . close ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { edu . isi . karma . rdf . TestAvroRDFGenerator . logger . error ( "testGenerateAvro2<sp>failed:" , e ) ; org . junit . Assert . fail ( ( "Execption:<sp>" + ( e . getMessage ( ) ) ) ) ; } } close ( ) { recordReader . close ( ) ; }
org . junit . Assert . assertEquals ( 7 , count )
testHadoopCodecFactoryBZip2 ( ) { org . apache . avro . file . CodecFactory hadoopSnappyCodec = org . apache . avro . hadoop . file . HadoopCodecFactory . fromHadoopString ( "org.apache.hadoop.io.compress.BZip2Codec" ) ; org . apache . avro . file . CodecFactory avroSnappyCodec = org . apache . avro . file . CodecFactory . fromString ( "bzip2" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return this . s . equals ( that . toString ( ) ) ; }
org . junit . Assert . assertTrue ( hadoopSnappyCodec . getClass ( ) . equals ( avroSnappyCodec . getClass ( ) ) )
testNoWildcards ( ) { com . github . dozermapper . core . vo . FurtherTestObjectPrime prime = mapper . map ( testDataFactory . getInputTestNoWildcardsFurtherTestObject ( ) , com . github . dozermapper . core . vo . FurtherTestObjectPrime . class ) ; com . github . dozermapper . core . vo . FurtherTestObject source = mapper . map ( prime , com . github . dozermapper . core . vo . FurtherTestObject . class ) ; com . github . dozermapper . core . vo . FurtherTestObjectPrime prime2 = mapper . map ( source , com . github . dozermapper . core . vo . FurtherTestObjectPrime . class ) ; "<AssertPlaceHolder>" ; } map ( java . lang . Object , java . lang . Class ) { return map ( srcObj , destClass , null ) ; }
org . junit . Assert . assertEquals ( prime2 , prime )
testName ( ) { org . apache . commons . math . geometry . euclidean . threed . RotationOrder [ ] orders = new org . apache . commons . math . geometry . euclidean . threed . RotationOrder [ ] { org . apache . commons . math . geometry . euclidean . threed . RotationOrder . XYZ , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . XZY , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . YXZ , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . YZX , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . ZXY , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . ZYX , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . XYX , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . XZX , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . YXY , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . YZY , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . ZXZ , org . apache . commons . math . geometry . euclidean . threed . RotationOrder . ZYZ } ; for ( int i = 0 ; i < ( orders . length ) ; ++ i ) { "<AssertPlaceHolder>" ; } } getFieldName ( com . google . javascript . rhino . Node ) { return n . getLastChild ( ) . getString ( ) ; }
org . junit . Assert . assertEquals ( getFieldName ( orders [ i ] ) , orders [ i ] . toString ( ) )
testNonWebAppProject ( ) { org . gradle . api . Project rootProject = org . gradle . testfixtures . ProjectBuilder . builder ( ) . withProjectDir ( testProjectRoot . getRoot ( ) ) . withName ( "root" ) . build ( ) ; rootProject . getPluginManager ( ) . apply ( "java" ) ; rootProject . getPluginManager ( ) . apply ( "com.google.cloud.tools.jib" ) ; ( ( org . gradle . api . internal . project . ProjectInternal ) ( rootProject ) ) . evaluate ( ) ; org . gradle . api . tasks . TaskContainer tasks = rootProject . getTasks ( ) ; try { tasks . getByPath ( ( ":" + ( JibPlugin . EXPLODED_WAR_TASK_NAME ) ) ) ; org . junit . Assert . fail ( ) ; } catch ( org . gradle . api . UnknownTaskException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertNotNull ( ex . getMessage ( ) )
testSelectStatement ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) , org . apache . phoenix . util . PropertiesUtil . deepCopy ( TestUtil . TEST_PROPERTIES ) ) ; final java . lang . String tableName = "TEST_TABLE" ; try { java . lang . String ddl = ( ( "CREATE<sp>TABLE<sp>" + tableName ) + "<sp>(a_string<sp>varchar<sp>not<sp>null,<sp>a_binary<sp>varbinary<sp>not<sp>null,<sp>col1<sp>integer" ) + "<sp>CONSTRAINT<sp>pk<sp>PRIMARY<sp>KEY<sp>(a_string,<sp>a_binary))\n" ; conn . createStatement ( ) . execute ( ddl ) ; final org . apache . hadoop . conf . Configuration configuration = new org . apache . hadoop . conf . Configuration ( ) ; configuration . set ( HConstants . ZOOKEEPER_QUORUM , getUrl ( ) ) ; org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . setInputTableName ( configuration , tableName ) ; final java . lang . String selectStatement = org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . getSelectStatement ( configuration ) ; final java . lang . String expectedSelectStatement = "SELECT<sp>\"A_STRING\"<sp>,<sp>\"A_BINARY\"<sp>,<sp>\"0\".\"COL1\"<sp>FROM<sp>" + tableName ; "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; } } getSelectStatement ( org . apache . hadoop . conf . Configuration ) { com . google . common . base . Preconditions . checkNotNull ( configuration ) ; java . lang . String selectStmt = configuration . get ( org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . SELECT_STATEMENT ) ; if ( org . apache . commons . lang3 . StringUtils . isNotEmpty ( selectStmt ) ) { return selectStmt ; } final java . lang . String tableName = org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . getInputTableName ( configuration ) ; com . google . common . base . Preconditions . checkNotNull ( tableName ) ; final java . util . List < org . apache . phoenix . util . ColumnInfo > columnMetadataList = org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . getSelectColumnMetadataList ( configuration ) ; final java . lang . String conditions = configuration . get ( org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . INPUT_TABLE_CONDITIONS ) ; selectStmt = org . apache . phoenix . util . QueryUtil . constructSelectStatement ( tableName , columnMetadataList , conditions ) ; org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . LOG . info ( ( "Select<sp>Statement:<sp>" + selectStmt ) ) ; configuration . set ( org . apache . phoenix . mapreduce . util . PhoenixConfigurationUtil . SELECT_STATEMENT , selectStmt ) ; return selectStmt ; }
org . junit . Assert . assertEquals ( expectedSelectStatement , selectStatement )
shouldHandleInvalidURLsGracefully ( ) { final ac . simons . biking2 . bikingpictures . DailyFratzeProvider dailyFratzeProvider = new ac . simons . biking2 . bikingpictures . DailyFratzeProvider ( "poef" ) ; java . net . URLConnection connection = dailyFratzeProvider . getRSSConnection ( "asd" ) ; "<AssertPlaceHolder>" ; } getRSSConnection ( java . lang . String ) { java . net . URLConnection rv = null ; try { rv = new java . net . URL ( java . util . Optional . ofNullable ( url ) . orElse ( "https://dailyfratze.de/michael/tags/Theme/Radtour?format=rss&dir=d" ) ) . openConnection ( ) ; } catch ( java . io . IOException ex ) { log . error ( "Failed<sp>to<sp>open<sp>URL<sp>connection<sp>to<sp>DailyFratze<sp>RSS<sp>endpoint" , ex ) ; } return rv ; }
org . junit . Assert . assertNull ( connection )
shouldGetSelectItemsFromCollection ( ) { this . selectItems . setParent ( mockParent ( javax . faces . component . UISelectMany . class ) ) ; java . util . Collection < javax . faces . model . SelectItem > value = java . util . Collections . singleton ( new javax . faces . model . SelectItem ( ) ) ; this . selectItems . setValue ( value ) ; java . util . Collection < javax . faces . model . SelectItem > actual = this . selectItems . getSelectItems ( ) ; "<AssertPlaceHolder>" ; } getSelectItems ( ) { if ( ( this . selectItems ) == null ) { javax . faces . context . FacesContext context = getFacesContext ( ) ; java . util . List < javax . faces . model . SelectItem > selectItems = new java . util . ArrayList < javax . faces . model . SelectItem > ( ) ; addNoSelectionOptionAsRequired ( context , selectItems ) ; java . lang . Iterable < java . lang . Object > valueItems = getOrDeduceValues ( ) ; for ( java . lang . Object valueItem : valueItems ) { javax . faces . model . SelectItem selectItem = convertToSelectItem ( context , valueItem ) ; selectItems . add ( selectItem ) ; } this . selectItems = selectItems ; } return this . selectItems ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( ( ( java . util . Collection < javax . faces . model . SelectItem > ) ( new java . util . ArrayList < javax . faces . model . SelectItem > ( value ) ) ) ) ) )
notLoggedShouldDeny ( ) { when ( request . getParameter ( "userId" ) ) . thenReturn ( "1" ) ; when ( userSession . isLogged ( ) ) . thenReturn ( false ) ; boolean shouldProceed = rule . shouldProceed ( userSession , request ) ; "<AssertPlaceHolder>" ; } shouldProceed ( net . jforum . entities . UserSession , javax . servlet . http . HttpServletRequest ) { int userId = this . findUserId ( request ) ; boolean logged = userSession . isLogged ( ) ; if ( ! logged ) { return false ; } net . jforum . entities . User currentUser = userSession . getUser ( ) ; if ( ( currentUser . getId ( ) ) == userId ) { return true ; } net . jforum . entities . User user = userRepository . get ( userId ) ; return userSession . getRoleManager ( ) . getCanEditUser ( user , currentUser . getGroups ( ) ) ; }
org . junit . Assert . assertFalse ( shouldProceed )
shouldConvertDynamicInlinedRemovedProperty ( ) { int key = 10 ; org . neo4j . kernel . impl . store . record . PropertyRecord before = org . neo4j . kernel . impl . api . index . PropertyPhysicalToLogicalConverterTest . propertyRecord ( property ( key , longString ) ) ; org . neo4j . kernel . impl . store . record . PropertyRecord after = org . neo4j . kernel . impl . api . index . PropertyPhysicalToLogicalConverterTest . propertyRecord ( ) ; org . neo4j . kernel . impl . api . index . EntityUpdates update = convert ( none , none , change ( before , after ) ) ; org . neo4j . kernel . impl . api . index . EntityUpdates expected = org . neo4j . kernel . impl . api . index . EntityUpdates . forEntity ( 0 , false ) . removed ( key , longString ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( idGeneratorFactoryProvider ) == null ) { requireNonNull ( fileSystemAbstraction , "File<sp>system<sp>is<sp>required<sp>to<sp>build<sp>id<sp>generator<sp>factory." ) ; idGeneratorFactoryProvider = ( databaseName ) -> new org . neo4j . kernel . impl . store . id . DefaultIdGeneratorFactory ( fileSystemAbstraction , idTypeConfigurationProvider ) ; } if ( ( idTypeConfigurationProvider ) == null ) { idTypeConfigurationProvider = new org . neo4j . kernel . impl . store . id . configuration . CommunityIdTypeConfigurationProvider ( ) ; } if ( ( factoryWrapper ) == null ) { factoryWrapper = identity ( ) ; } return new org . neo4j . graphdb . factory . module . id . IdContextFactory ( jobScheduler , idGeneratorFactoryProvider , idTypeConfigurationProvider , idReuseEligibility , factoryWrapper ) ; }
org . junit . Assert . assertEquals ( expected , update )
formatacceptxml ( ) { com . fujitsu . dc . core . rs . odata . ODataEntityResource odataEntityResource = new com . fujitsu . dc . core . rs . odata . ODataEntityResource ( ) ; javax . ws . rs . core . MediaType type = odataEntityResource . decideOutputFormat ( null , null ) ; "<AssertPlaceHolder>" ; } decideOutputFormat ( java . lang . String , java . lang . String ) { javax . ws . rs . core . MediaType mediaType = null ; if ( format != null ) { mediaType = decideOutputFormatFromQueryValue ( format ) ; } else if ( accept != null ) { mediaType = decideOutputFormatFromHeaderValues ( accept ) ; } if ( mediaType == null ) { mediaType = javax . ws . rs . core . MediaType . APPLICATION_ATOM_XML_TYPE ; } return mediaType ; }
org . junit . Assert . assertEquals ( MediaType . APPLICATION_ATOM_XML_TYPE , type )
shouldRespectWithNullMap ( ) { io . sundr . it . Lazy item = new io . sundr . it . LazyBuilder ( ) . withMap ( null ) . build ( ) ; "<AssertPlaceHolder>" ; } getMap ( ) { return this . map ; }
org . junit . Assert . assertNull ( item . getMap ( ) )
getPatientIdentifiers_shouldNotFetchPatientIdentifiersThatPartiallyMatchesGivenIdentifier ( ) { java . lang . String identifier = "123" ; java . util . List < org . openmrs . PatientIdentifier > patientIdentifiers = dao . getPatientIdentifiers ( identifier , new java . util . ArrayList ( ) , new java . util . ArrayList ( ) , new java . util . ArrayList ( ) , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( patientIdentifiers . isEmpty ( ) )
testGraphUnnest ( ) { fr . inria . corese . core . Graph g = fr . inria . corese . core . GraphStore . create ( ) ; fr . inria . corese . core . query . QueryProcess exec = fr . inria . corese . core . query . QueryProcess . create ( g ) ; fr . inria . corese . core . Graph g1 = fr . inria . corese . core . Graph . create ( ) ; fr . inria . corese . core . query . QueryProcess exec1 = fr . inria . corese . core . query . QueryProcess . create ( g1 ) ; java . lang . String i = "insert<sp>data<sp>{<sp>us:prop1<sp>rdfs:label<sp>'prop'<sp>us:prop<sp>rdfs:label<sp>'prop2'<sp>}" ; java . lang . String q = "select<sp>*<sp>where<sp>{" + ( ( ( ( ( ( ( ( "values<sp>(?s<sp>?p<sp>?o)<sp>{<sp>unnest(us:define())<sp>}" + "values<sp>(?s<sp>?p<sp>?o<sp>?g)<sp>{<sp>unnest(us:define())<sp>}" ) + "?s<sp>?p<sp>?o<sp>" ) + "}" ) + "function<sp>us:define(){" ) + "let<sp>(?g<sp>=<sp>construct<sp>{us:prop1<sp>rdfs:label<sp>'prop'<sp>us:prop<sp>rdfs:label<sp>'prop2'}<sp>where<sp>{})" ) + "{<sp>" ) + "?g<sp>}" ) + "}" ) ; exec . query ( i ) ; fr . inria . corese . kgram . core . Mappings map = exec . query ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return tests . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , map . size ( ) )
shouldGetUnknownProperty ( ) { final uk . gov . gchq . gaffer . store . StoreProperties props = createStoreProperties ( ) ; java . lang . String value = props . get ( "a<sp>key<sp>that<sp>does<sp>not<sp>exist" ) ; "<AssertPlaceHolder>" ; } get ( K ) { return multiMap . get ( key ) ; }
org . junit . Assert . assertNull ( value )
testGetSize ( ) { org . openscience . cdk . config . Isotopes isofac = org . openscience . cdk . config . Isotopes . getInstance ( ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return size ; }
org . junit . Assert . assertTrue ( ( ( isofac . getSize ( ) ) > 0 ) )
testFindPrimaryReferenceSingleChildOfSpan ( ) { io . opentracing . Tracer tracer = new org . hawkular . apm . client . opentracing . APMTracer ( ) ; io . opentracing . Span span = tracer . buildSpan ( "test" ) . start ( ) ; io . opentracing . impl . AbstractSpanBuilder . Reference ref = new io . opentracing . impl . AbstractSpanBuilder . Reference ( io . opentracing . References . CHILD_OF , span . context ( ) ) ; "<AssertPlaceHolder>" ; } findPrimaryReference ( java . util . List ) { java . util . List < io . opentracing . impl . AbstractSpanBuilder . Reference > followsFrom = references . stream ( ) . filter ( ( ref ) -> ( References . FOLLOWS_FROM . equals ( ref . getReferenceType ( ) ) ) && ( ( ref . getReferredTo ( ) ) instanceof io . opentracing . impl . APMSpan ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . List < io . opentracing . impl . AbstractSpanBuilder . Reference > childOfSpan = references . stream ( ) . filter ( ( ref ) -> ( References . CHILD_OF . equals ( ref . getReferenceType ( ) ) ) && ( ( ref . getReferredTo ( ) ) instanceof io . opentracing . impl . APMSpan ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . List < io . opentracing . impl . AbstractSpanBuilder . Reference > extractedTraceState = references . stream ( ) . filter ( ( ref ) -> ( ref . getReferredTo ( ) ) instanceof io . opentracing . impl . APMSpanBuilder ) . collect ( java . util . stream . Collectors . toList ( ) ) ; if ( ! ( extractedTraceState . isEmpty ( ) ) ) { if ( ( extractedTraceState . size ( ) ) == 1 ) { return extractedTraceState . get ( 0 ) ; } return null ; } if ( ! ( childOfSpan . isEmpty ( ) ) ) { if ( ( childOfSpan . size ( ) ) == 1 ) { return childOfSpan . get ( 0 ) ; } return null ; } if ( ( followsFrom . size ( ) ) == 1 ) { return followsFrom . get ( 0 ) ; } return null ; }
org . junit . Assert . assertEquals ( ref , io . opentracing . impl . APMSpan . findPrimaryReference ( java . util . Arrays . asList ( ref ) ) )
testBrowseDescReadMode ( ) { com . streamsets . pipeline . stage . origin . opcua . OpcUaClientSource source = new com . streamsets . pipeline . stage . origin . opcua . OpcUaClientSource ( getConfig ( OpcUaReadMode . BROWSE_NODES , java . util . Collections . emptyList ( ) ) ) ; com . streamsets . pipeline . sdk . PushSourceRunner runner = new com . streamsets . pipeline . sdk . PushSourceRunner . Builder ( com . streamsets . pipeline . stage . origin . opcua . OpcUaClientDSource . class , source ) . addOutputLane ( "a" ) . build ( ) ; runner . runInit ( ) ; try { java . util . List < com . streamsets . pipeline . api . Record > records = new java . util . ArrayList ( ) ; runner . runProduce ( java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) , 1 , new com . streamsets . pipeline . sdk . PushSourceRunner . Callback ( ) { @ com . streamsets . pipeline . stage . origin . opcua . Override public void processBatch ( com . streamsets . pipeline . sdk . StageRunner . Output output ) { records . clear ( ) ; records . addAll ( output . getRecords ( ) . get ( "a" ) ) ; runner . setStop ( ) ; } } ) ; runner . waitOnProduce ( ) ; "<AssertPlaceHolder>" ; } finally { runner . runDestroy ( ) ; } } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , records . size ( ) )
testInvalidConfigMissingSuperInit ( ) { com . streamsets . pipeline . api . Processor processor = new com . streamsets . pipeline . api . base . SingleLaneProcessor ( ) { @ com . streamsets . pipeline . api . base . Override protected java . util . List < com . streamsets . pipeline . api . base . ConfigIssue > init ( ) { return java . util . Collections . emptyList ( ) ; } @ com . streamsets . pipeline . api . base . Override public void process ( com . streamsets . pipeline . api . Batch batch , com . streamsets . pipeline . api . base . SingleLaneBatchMaker singleLaneBatchMaker ) throws com . streamsets . pipeline . api . StageException { } } ; com . streamsets . pipeline . api . Stage . Info info = org . mockito . Mockito . mock ( Stage . Info . class ) ; com . streamsets . pipeline . api . Processor . Context context = org . mockito . Mockito . mock ( Processor . Context . class ) ; org . mockito . Mockito . when ( context . getOutputLanes ( ) ) . thenReturn ( Collections . EMPTY_LIST ) ; "<AssertPlaceHolder>" ; } init ( com . streamsets . pipeline . api . impl . annotationsprocessor . Info , com . streamsets . pipeline . api . impl . annotationsprocessor . Context ) { return null ; }
org . junit . Assert . assertFalse ( processor . init ( info , context ) . isEmpty ( ) )
testResolvedArtifact ( ) { org . apache . tuscany . sca . contribution . processor . ProcessorContext context = new org . apache . tuscany . sca . contribution . processor . ProcessorContext ( ) ; org . apache . tuscany . sca . contribution . Artifact artifact = factory . createArtifact ( ) ; artifact . setURI ( "foo/bar" ) ; resolver . addModel ( artifact , context ) ; org . apache . tuscany . sca . contribution . Artifact x = factory . createArtifact ( ) ; x . setURI ( "foo/bar" ) ; x = resolver . resolveModel ( org . apache . tuscany . sca . contribution . Artifact . class , x , context ) ; "<AssertPlaceHolder>" ; } resolveModel ( java . lang . Class , T , org . apache . tuscany . sca . contribution . processor . ProcessorContext ) { java . lang . Object resolved = map . get ( unresolved ) ; if ( resolved != null ) { return modelClass . cast ( resolved ) ; } return unresolved ; }
org . junit . Assert . assertTrue ( ( x == artifact ) )
getVendorRoleForPaymentConfiguration_None ( ) { org . oscm . domobjects . Organization org = new org . oscm . domobjects . Organization ( ) ; org . oscm . test . data . Organizations . grantOrganizationRole ( org , OrganizationRoleType . CUSTOMER ) ; org . oscm . test . data . Organizations . grantOrganizationRole ( org , OrganizationRoleType . BROKER ) ; org . oscm . test . data . Organizations . grantOrganizationRole ( org , OrganizationRoleType . PLATFORM_OPERATOR ) ; "<AssertPlaceHolder>" ; } getVendorRoleForPaymentConfiguration ( ) { org . oscm . internal . types . enumtypes . OrganizationRoleType role = null ; java . util . Set < org . oscm . internal . types . enumtypes . OrganizationRoleType > types = getGrantedRoleTypes ( ) ; if ( types . contains ( OrganizationRoleType . SUPPLIER ) ) { role = org . oscm . internal . types . enumtypes . OrganizationRoleType . SUPPLIER ; } else if ( getGrantedRoleTypes ( ) . contains ( OrganizationRoleType . RESELLER ) ) { role = org . oscm . internal . types . enumtypes . OrganizationRoleType . RESELLER ; } return role ; }
org . junit . Assert . assertNull ( org . getVendorRoleForPaymentConfiguration ( ) )
testMergeJoinMultiWayNone2 ( ) { org . apache . rya . api . domain . RyaIRI pred = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . HashJoinTest . litdupsNS , "pred1" ) ; org . apache . rya . api . domain . RyaType zero = new org . apache . rya . api . domain . RyaType ( "0" ) ; org . apache . rya . api . domain . RyaType one = new org . apache . rya . api . domain . RyaType ( "1" ) ; org . apache . rya . api . domain . RyaType two = new org . apache . rya . api . domain . RyaType ( "2" ) ; org . apache . rya . api . domain . RyaType three = new org . apache . rya . api . domain . RyaType ( "3" ) ; org . apache . rya . api . domain . RyaType four = new org . apache . rya . api . domain . RyaType ( "4" ) ; org . apache . rya . api . domain . RyaIRI subj1 = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . HashJoinTest . litdupsNS , "subj1" ) ; org . apache . rya . api . domain . RyaIRI subj2 = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . HashJoinTest . litdupsNS , "subj2" ) ; org . apache . rya . api . domain . RyaIRI subj3 = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . HashJoinTest . litdupsNS , "subj3" ) ; org . apache . rya . api . domain . RyaIRI subj4 = new org . apache . rya . api . domain . RyaIRI ( org . apache . rya . HashJoinTest . litdupsNS , "subj4" ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj1 , pred , one ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj1 , pred , four ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj2 , pred , zero ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj2 , pred , one ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj2 , pred , four ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj3 , pred , two ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj3 , pred , four ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj4 , pred , one ) ) ; dao . add ( new org . apache . rya . api . domain . RyaStatement ( subj4 , pred , two ) ) ; org . apache . rya . api . persist . query . join . HashJoin hjoin = new org . apache . rya . api . persist . query . join . HashJoin ( dao . getQueryEngine ( ) ) ; org . eclipse . rdf4j . common . iteration . CloseableIteration < org . apache . rya . api . domain . RyaIRI , org . apache . rya . api . persist . RyaDAOException > join = hjoin . join ( null , new RdfCloudTripleStoreUtils . CustomEntry < org . apache . rya . api . domain . RyaIRI , org . apache . rya . api . domain . RyaType > ( pred , one ) , new RdfCloudTripleStoreUtils . CustomEntry < org . apache . rya . api . domain . RyaIRI , org . apache . rya . api . domain . RyaType > ( pred , two ) , new RdfCloudTripleStoreUtils . CustomEntry < org . apache . rya . api . domain . RyaIRI , org . apache . rya . api . domain . RyaType > ( pred , three ) , new RdfCloudTripleStoreUtils . CustomEntry < org . apache . rya . api . domain . RyaIRI , org . apache . rya . api . domain . RyaType > ( pred , four ) ) ; "<AssertPlaceHolder>" ; join . close ( ) ; } hasNext ( ) { return joinedResults . hasNext ( ) ; }
org . junit . Assert . assertFalse ( join . hasNext ( ) )
MathML_html ( ) { java . lang . String input = "<math><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mrow><mn>4</mn><mo>+</mo><mi>x</mi></mrow><mo>+</mo><mn>4</mn></mrow><mo>=</mo><mn>0</mn></mrow></math>" ; java . lang . String expect = "<span<sp>id=\"MTH-0001\"<sp>class=\"math\"<sp>format=\"mathml\"><math><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mrow><mn>4</mn><mo>+</mo><mi>x</mi></mrow><mo>+</mo><mn>4</mn></mrow><mo>=</mo><mn>0</mn></mrow></math></span>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expect , actual )
testGetNameWhenParentHasNullName ( ) { final org . kie . workbench . common . dmn . api . definition . v1_1 . InformationItemPrimary informationItem = mock ( org . kie . workbench . common . dmn . api . definition . v1_1 . InformationItemPrimary . class ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . InputData parent = mock ( org . kie . workbench . common . dmn . api . definition . v1_1 . InputData . class ) ; when ( informationItem . getParent ( ) ) . thenReturn ( parent ) ; when ( parent . getName ( ) ) . thenReturn ( null ) ; final java . lang . String name = org . kie . workbench . common . dmn . backend . definition . v1_1 . InformationItemPrimaryPropertyConverter . getName ( informationItem ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return dayTimeValues ( ) . allMatch ( this :: isNone ) ; }
org . junit . Assert . assertTrue ( name . isEmpty ( ) )
selectWithTwoParams ( ) { org . qlrm . executor . JpaQueryExecutor queryExecutor = new org . qlrm . executor . JpaQueryExecutor ( ) ; java . util . List < org . qlrm . to . EmployeeTO > list = queryExecutor . executeSelect ( em , org . qlrm . to . EmployeeTO . class , "select_with_two_params.sql" , 1 , "Peter<sp>Muster" ) ; "<AssertPlaceHolder>" ; for ( org . qlrm . to . EmployeeTO rec : list ) { org . qlrm . executor . JpaQueryExecutorTest . LOGGER . debug ( rec ) ; } } executeSelect ( javax . persistence . EntityManager , java . lang . Class , java . lang . String , org . qlrm . executor . PageRequest , java . lang . Object [ ] ) { java . lang . String sqlString = org . qlrm . executor . FileUtil . getFileAsString ( filename ) ; javax . persistence . Query query = em . createNativeQuery ( sqlString ) ; if ( ( pageRequest . getFirstResult ( ) ) != null ) { query . setFirstResult ( pageRequest . getFirstResult ( ) ) ; } if ( ( pageRequest . getMaxResult ( ) ) != null ) { query . setMaxResults ( pageRequest . getMaxResult ( ) ) ; } if ( ( params . length ) > 0 ) { setParams ( query , params ) ; } return jpaResultMapper . list ( query , clazz ) ; }
org . junit . Assert . assertNotNull ( list )
testJumpTo2 ( ) { try ( com . questdb . cairo . VirtualMemory mem = new com . questdb . cairo . VirtualMemory ( 11 ) ) { mem . jumpTo ( 8 ) ; int n = 999 ; for ( int i = n ; i > 0 ; i -- ) { mem . putLong ( i ) ; } long o = 8 ; for ( int i = n ; i > 0 ; i -- ) { "<AssertPlaceHolder>" ; o += 8 ; } } } getLong ( int ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( i , mem . getLong ( o ) )
testCancelOnErrorWithAnnotation01 ( ) { org . databene . contiperf . junit . ContiPerfRuleTest . TestBean test = new org . databene . contiperf . junit . ContiPerfRuleTest . TestBean ( ) ; try { check ( test , "cancelOnErrorWithAnnotation01" ) ; } catch ( org . databene . contiperf . junit . PerformanceRequirementFailedError e ) { int count = test . cancelOnErrorCountWithAnnotation01 . get ( ) ; "<AssertPlaceHolder>" ; throw e ; } } check ( org . databene . contiperf . junit . ContiPerfRuleTest$TestBean , java . lang . String ) { org . databene . contiperf . junit . ContiPerfRule rule = new org . databene . contiperf . junit . ContiPerfRule ( new org . databene . contiperf . report . ListReportModule ( ) ) ; java . lang . reflect . Method method = org . databene . contiperf . junit . ContiPerfRuleTest . TestBean . class . getDeclaredMethod ( methodName , new java . lang . Class < ? > [ 0 ] ) ; org . junit . runners . model . Statement base = new org . databene . contiperf . junit . ContiPerfRuleTest . InvokerStatement ( target , method ) ; org . junit . runners . model . FrameworkMethod fwMethod = new org . junit . runners . model . FrameworkMethod ( method ) ; org . junit . runners . model . Statement perfTestStatement = rule . apply ( base , fwMethod , target ) ; perfTestStatement . evaluate ( ) ; return target ; }
org . junit . Assert . assertEquals ( 5 , count )
testEnumGetters ( ) { final java . util . List < java . lang . Class < ? > > classes = nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . GetterEnSetterTest . getClassesInPackage ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . GetterEnSetterTest . ROOT_PACKAGE ) ; final java . util . List < java . lang . Class < ? > > enums = filterClassesOpEnums ( classes ) ; for ( final java . lang . Class < ? > clazz : enums ) { final java . lang . Object obj = clazz . getEnumConstants ( ) [ 0 ] ; final java . lang . reflect . Field [ ] enumVelden = clazz . getDeclaredFields ( ) ; for ( final java . lang . reflect . Field enumVeld : enumVelden ) { final java . lang . reflect . Method getterMethode = getGetterMethodeVoorVeld ( enumVeld ) ; if ( ( getterMethode != null ) && ( isTestbareGetterMethodeVoorVeld ( getterMethode , enumVeld ) ) ) { enumVeld . setAccessible ( true ) ; "<AssertPlaceHolder>" ; } } } } get ( java . lang . Integer ) { final nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig item = blobifierService . leesBlob ( id ) ; if ( item == null ) { throw new nl . bzk . brp . beheer . webapp . controllers . ErrorHandler . NotFoundException ( ) ; } return item ; }
org . junit . Assert . assertSame ( enumVeld . get ( obj ) , getterMethode . invoke ( obj ) )
test2methylbutanol_R ( ) { org . openscience . cdk . interfaces . IAtomContainer molecule = org . openscience . cdk . geometry . cip . CIPSMILESTest . smiles . parseSmiles ( "OCC([H])(C)CC" ) ; org . openscience . cdk . geometry . cip . LigancyFourChirality chirality = org . openscience . cdk . geometry . cip . CIPTool . defineLigancyFourChirality ( molecule , 2 , 3 , 1 , 4 , 5 , Stereo . CLOCKWISE ) ; "<AssertPlaceHolder>" ; } getCIPChirality ( org . openscience . cdk . geometry . cip . LigancyFourChirality ) { org . openscience . cdk . geometry . cip . ILigand [ ] ligands = org . openscience . cdk . geometry . cip . CIPTool . order ( stereoCenter . getLigands ( ) ) ; org . openscience . cdk . geometry . cip . LigancyFourChirality rsChirality = stereoCenter . project ( ligands ) ; boolean allAreDifferent = org . openscience . cdk . geometry . cip . CIPTool . checkIfAllLigandsAreDifferent ( ligands ) ; if ( ! allAreDifferent ) return org . openscience . cdk . geometry . cip . CIPTool . CIP_CHIRALITY . NONE ; if ( ( rsChirality . getStereo ( ) ) == ( org . openscience . cdk . interfaces . ITetrahedralChirality . Stereo . CLOCKWISE ) ) return org . openscience . cdk . geometry . cip . CIPTool . CIP_CHIRALITY . R ; return org . openscience . cdk . geometry . cip . CIPTool . CIP_CHIRALITY . S ; }
org . junit . Assert . assertEquals ( CIP_CHIRALITY . R , org . openscience . cdk . geometry . cip . CIPTool . getCIPChirality ( chirality ) )
simple ( ) { setupComposeExpectations ( "docker-compose.yml" ) ; java . util . List < io . fabric8 . maven . docker . config . ImageConfiguration > configs = handler . resolve ( unresolved , project , session ) ; "<AssertPlaceHolder>" ; validateRunConfiguration ( configs . get ( 0 ) . getRunConfiguration ( ) ) ; } resolve ( io . fabric8 . maven . docker . config . ImageConfiguration , org . apache . maven . project . MavenProject , org . apache . maven . execution . MavenSession ) { injectExternalConfigActivation ( unresolvedConfig , project ) ; io . fabric8 . maven . docker . config . handler . Map < java . lang . String , java . lang . String > externalConfig = unresolvedConfig . getExternalConfig ( ) ; if ( externalConfig != null ) { java . lang . String type = externalConfig . get ( "type" ) ; if ( type == null ) { throw new java . lang . IllegalArgumentException ( ( ( unresolvedConfig . getDescription ( ) ) + ":<sp>No<sp>config<sp>type<sp>given" ) ) ; } io . fabric8 . maven . docker . config . handler . ExternalConfigHandler handler = registry . get ( type ) ; if ( handler == null ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( unresolvedConfig . getDescription ( ) ) + ":<sp>No<sp>handler<sp>for<sp>type<sp>" ) + type ) + "<sp>given" ) ) ; } return handler . resolve ( unresolvedConfig , project , session ) ; } else { return io . fabric8 . maven . docker . config . handler . Collections . singletonList ( unresolvedConfig ) ; } }
org . junit . Assert . assertEquals ( 1 , configs . size ( ) )
updateRevenueShare ( ) { org . oscm . domobjects . RevenueShareModel revenueShareNew = createRevenueShareModel ( BigDecimal . ZERO , RevenueShareModelType . BROKER_REVENUE_SHARE ) ; revenueShareNew . setKey ( 2 ) ; org . oscm . domobjects . RevenueShareModel revenueShare = new org . oscm . domobjects . RevenueShareModel ( ) ; revenueShare . setKey ( 2 ) ; org . oscm . domobjects . RevenueShareModel updatedRevenueShare = bean . updateRevenueShare ( revenueShare , revenueShareNew , 0 ) ; "<AssertPlaceHolder>" ; } getRevenueShare ( ) { return revenueShare ; }
org . junit . Assert . assertEquals ( updatedRevenueShare . getRevenueShare ( ) , revenueShareNew . getRevenueShare ( ) )
setServiceAccountName ( ) { com . openshift . internal . restclient . model . v1 . ReplicationControllerTest . rc . setServiceAccountName ( "newDBServiceAccountName" ) ; "<AssertPlaceHolder>" ; } getServiceAccountName ( ) { org . junit . Assert . assertEquals ( "dbServiceAccountName" , com . openshift . internal . restclient . model . v1 . ReplicationControllerTest . rc . getServiceAccountName ( ) ) ; }
org . junit . Assert . assertEquals ( "newDBServiceAccountName" , com . openshift . internal . restclient . model . v1 . ReplicationControllerTest . rc . getServiceAccountName ( ) )
testCreateProceduresSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . DocumentBuilder < org . openhealthtools . mdht . uml . cda . ccd . ContinuityOfCareDocument > clinicalDocumentBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createContinuityOfCareDocumentBuilder ( ) ; org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ccd . ProceduresSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createProceduresSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . ccd . ProceduresSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . save ( clinicalDocumentBuilder . with ( section ) . buildDocument ( ) , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
newResponse ( ) { org . jboss . elasticsearch . river . remote . mgm . incrementalupdate . IncrementalUpdateResponse rb = IncrementalUpdateAction . INSTANCE . newResponse ( ) ; "<AssertPlaceHolder>" ; } newResponse ( ) { return new org . jboss . elasticsearch . river . remote . mgm . incrementalupdate . IncrementalUpdateResponse ( ) ; }
org . junit . Assert . assertNotNull ( rb )
resolveTargetSpecsIgnoresBuckout ( ) { java . nio . file . Path buckout = filesystem . getBuckPaths ( ) . getBuckOut ( ) ; java . nio . file . Path buckFile = cellRoot . resolve ( buckout . resolve ( "BUCK" ) ) ; java . nio . file . Files . createDirectories ( buckFile . getParent ( ) ) ; java . nio . file . Files . write ( buckFile , "genrule(name='foo',<sp>out='foo',<sp>cmd='foo')" . getBytes ( com . facebook . buck . parser . UTF_8 ) ) ; com . google . common . collect . ImmutableList < com . google . common . collect . ImmutableSet < com . facebook . buck . core . model . BuildTarget > > targets = resolve ( com . google . common . collect . ImmutableList . of ( com . facebook . buck . parser . ImmutableTargetNodePredicateSpec . of ( com . facebook . buck . parser . BuildFileSpec . fromRecursivePath ( buckout , cell . getRoot ( ) ) ) ) ) ; "<AssertPlaceHolder>" ; } equalTo ( com . facebook . buck . query . QueryEnvironment$Argument ) { return ( ( ( type . equals ( other . type ) ) && ( ( integer ) == ( other . integer ) ) ) && ( java . util . Objects . equals ( expression , other . expression ) ) ) && ( java . util . Objects . equals ( word , other . word ) ) ; }
org . junit . Assert . assertThat ( targets , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableList . of ( com . google . common . collect . ImmutableSet . of ( ) ) ) )
toPrimitiveShortForEmptyString ( ) { "<AssertPlaceHolder>" ; } toPrimitiveShort ( java . lang . Object ) { java . lang . Short s = org . slim3 . util . ShortUtil . toShort ( o ) ; if ( s == null ) { return 0 ; } return s . shortValue ( ) ; }
org . junit . Assert . assertThat ( org . slim3 . util . ShortUtil . toPrimitiveShort ( "" ) , org . hamcrest . CoreMatchers . is ( ( ( short ) ( 0 ) ) ) )
testInjectExternalUrls ( ) { eu . europa . esig . dss . client . ocsp . OnlineOCSPSource ocspSource = new eu . europa . esig . dss . client . ocsp . OnlineOCSPSource ( ) ; ocspSource . setDataLoader ( new eu . europa . esig . dss . client . http . commons . OCSPDataLoader ( ) ) ; java . util . List < java . lang . String > alternativeOCSPUrls = new java . util . ArrayList < java . lang . String > ( ) ; alternativeOCSPUrls . add ( "http://wrong.url.com" ) ; eu . europa . esig . dss . x509 . RevocationSource < eu . europa . esig . dss . x509 . ocsp . OCSPToken > currentOCSPSource = new eu . europa . esig . dss . x509 . AlternateUrlsSourceAdapter < eu . europa . esig . dss . x509 . ocsp . OCSPToken > ( ocspSource , alternativeOCSPUrls ) ; eu . europa . esig . dss . x509 . ocsp . OCSPToken ocspToken = currentOCSPSource . getRevocationToken ( certificateToken , rootToken ) ; "<AssertPlaceHolder>" ; } getRevocationToken ( eu . europa . esig . dss . x509 . CertificateToken , eu . europa . esig . dss . x509 . CertificateToken ) { return getRevocationToken ( certificateToken , issuerCertificateToken , java . util . Collections . < java . lang . String > emptyList ( ) ) ; }
org . junit . Assert . assertNotNull ( ocspToken )
testSerialization ( ) { org . jfree . chart . entity . ContourEntity e1 = new org . jfree . chart . entity . ContourEntity ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) , "ToolTip" , "URL" ) ; org . jfree . chart . entity . ContourEntity e2 = ( ( org . jfree . chart . entity . ContourEntity ) ( org . jfree . chart . TestUtilities . serialised ( e1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( e1 , e2 )
testCompareToNameGt ( ) { org . jboss . forge . furnace . addons . AddonId left = org . jboss . forge . furnace . addons . AddonId . from ( "def" , "1.0.0-SNAPSHOT" ) ; org . jboss . forge . furnace . addons . AddonId right = org . jboss . forge . furnace . addons . AddonId . from ( "abc" , "1.0.0-SNAPSHOT" ) ; "<AssertPlaceHolder>" ; } compareTo ( org . jboss . forge . furnace . versions . Version ) { if ( otherVersion == null ) throw new java . lang . NullPointerException ( "Cannot<sp>compare<sp>against<sp>null." ) ; if ( otherVersion instanceof org . jboss . forge . furnace . versions . SingleVersion ) { return this . comparable . compareTo ( ( ( org . jboss . forge . furnace . versions . SingleVersion ) ( otherVersion ) ) . comparable ) ; } else { return compareTo ( new org . jboss . forge . furnace . versions . SingleVersion ( otherVersion . toString ( ) ) ) ; } }
org . junit . Assert . assertTrue ( ( ( left . compareTo ( right ) ) > 0 ) )
findMostRelevantResource_after ( ) { ch . puzzle . itc . mobiliar . business . generator . control . extracted . List < ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity > resources = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . ArrayList ( ) ; resources . add ( r1 ) ; resources . add ( r2 ) ; resources . add ( r3 ) ; resources . add ( r4 ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . Calendar cal = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . GregorianCalendar ( ) ; cal . set ( 2004 , Calendar . FEBRUARY , 1 ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . Date relevantDate = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . Date ( cal . getTimeInMillis ( ) ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity mostRelevantResource = service . findMostRelevantResource ( resources , relevantDate ) ; "<AssertPlaceHolder>" ; } findMostRelevantResource ( ch . puzzle . itc . mobiliar . business . generator . control . extracted . List , ch . puzzle . itc . mobiliar . business . generator . control . extracted . Date ) { if ( ( resources == null ) || ( relevantDate == null ) ) { return null ; } ch . puzzle . itc . mobiliar . business . generator . control . extracted . List < ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity > allReleaseResourcesOrderedByRelease = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . ArrayList ( resources ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . Collections . sort ( allReleaseResourcesOrderedByRelease , resourceReleaseComparator ) ; ch . puzzle . itc . mobiliar . business . generator . control . extracted . SortedSet < ch . puzzle . itc . mobiliar . business . releasing . entity . ReleaseEntity > releases = new ch . puzzle . itc . mobiliar . business . generator . control . extracted . TreeSet ( ) ; for ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resourceEntity : allReleaseResourcesOrderedByRelease ) { releases . add ( resourceEntity . getRelease ( ) ) ; } ch . puzzle . itc . mobiliar . business . releasing . entity . ReleaseEntity mostRelevantRelease = findMostRelevantRelease ( releases , relevantDate ) ; if ( mostRelevantRelease != null ) { for ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resourceEntity : allReleaseResourcesOrderedByRelease ) { if ( mostRelevantRelease . equals ( resourceEntity . getRelease ( ) ) ) { return resourceEntity ; } } } return null ; }
org . junit . Assert . assertEquals ( r4 , mostRelevantResource )
whenAddValueInLinkedSetThatArrayHaveOnlyUniqueValue ( ) { ru . szhernovoy . set . LinkedSet < java . lang . String > container = new ru . szhernovoy . set . LinkedSet ( ) ; container . add ( "first" ) ; container . add ( "second" ) ; container . add ( "first" ) ; java . lang . String control = "" ; while ( container . hasNext ( ) ) { control = container . next ( ) ; } "<AssertPlaceHolder>" ; } next ( ) { java . math . BigInteger oldValue ; java . math . BigInteger newValue ; do { oldValue = ( ( java . math . BigInteger ) ( refCounter . get ( ) ) ) ; newValue = ( oldValue == null ) ? java . math . BigInteger . valueOf ( 1 ) : oldValue . shiftLeft ( 1 ) ; } while ( ! ( refCounter . compareAndSet ( oldValue , newValue ) ) ) ; return newValue ; }
org . junit . Assert . assertThat ( control , org . hamcrest . core . Is . is ( "second" ) )
testSetPropertyClosure ( ) { org . apache . camel . Exchange result = producerTemplate . request ( "direct:input2" , new org . apache . camel . Processor ( ) { public void process ( org . apache . camel . Exchange exchange ) throws org . openehealth . ipf . platform . camel . core . extend . Exception { exchange . getIn ( ) . setBody ( "blah" ) ; } } ) ; "<AssertPlaceHolder>" ; } process ( org . apache . cxf . binding . soap . SoapMessage ) { if ( canProcess ( ) ) { logPayload ( message ) ; } }
org . junit . Assert . assertEquals ( "blah" , result . getProperty ( "test" ) )
testHasRecipientList ( ) { hudson . plugins . emailext . EmailType t = new hudson . plugins . emailext . EmailType ( ) ; t . addRecipientProvider ( new hudson . plugins . emailext . plugins . recipients . ListRecipientProvider ( ) ) ; "<AssertPlaceHolder>" ; } getHasRecipients ( ) { return ( ( ( recipientProviders ) != null ) && ( ! ( recipientProviders . isEmpty ( ) ) ) ) || ( ( ( recipientList ) != null ) && ( ( recipientList . trim ( ) . length ( ) ) != 0 ) ) ; }
org . junit . Assert . assertTrue ( t . getHasRecipients ( ) )